Re: [sqlalchemy] dogpile cache async_creation_runner question (actually with sqlalchemy but the example has the sqla factored out)

2015-01-04 Thread Michael Bayer
the important part here is that KeyReentrantMutex is only used for the file backend, in conjunction with the flock-based file lock that is explicitly only safe for use in one thread at a time. So with that lock, this pattern is not compatible. You’d need to use a different backend or at

[sqlalchemy] Re: No module named pyodbc for custom Dialect

2015-01-04 Thread Lycovian
Never mind. I had used the Bitbucket *sqlalchemy-access* as a template and forgot to include the pyodbc.py file from the example in my code. As it was named pyodbc.py it confused the issue. Please disregard question. On Saturday, January 3, 2015 9:30:00 PM UTC-8, Lycovian wrote: I'm

Re: [sqlalchemy] loop over two large tables to join them

2015-01-04 Thread Simon King
(side note: you shouldn’t need “session.add(a)” in your code below - “a” was loaded via the session, so it is already in it) I’d start by thinking about the SQL first, and worry about SQLAlchemy afterwards. To find the TableA rows that only have 1 matching row in TableB, you’d want something

[sqlalchemy] hybrid_property query into a JSON column with overrides (PostgreSQL)

2015-01-04 Thread Kevin
Hi, I'm using sqlalchemy with postgresql-9.3. I'm trying to create a query-able column in a table that checks for explicit user overrides before checking the original raw data in a JSON column. An example of what I'm trying to do is below. The 'raw_data' JSON may be something like: {'foo':

Re: [sqlalchemy] dogpile cache async_creation_runner question (actually with sqlalchemy but the example has the sqla factored out)

2015-01-04 Thread Rob Fowler
Thanks for the reply Mike. The explanation is somewhat as expected. Based on this, to keep things simple and being bone lazy, I switched the the 'redis' backend, whose locking is outside of the process and works 100% with multiple threads out of the box. -- You received this message because