That works like a charm, thanks!
On 06/21/2012 12:46 AM, Michael Bayer wrote:
do it like this for now:
class FilterMixin(object):
@declared_attr
def _filters(cls):
cls.filters = association_proxy('_filters', 'filter')
return relationship(cls.filter_class,
Hi all,
I'm using Python 2.6.5 and SQLAlchemy-0.7.8 over sqlite3 to store and
retrieve logs with in table like this :
class LogEntry(Base):
Log class
__tablename__ = 'log'
#common data
id = Column(Integer, primary_key=True)
timestamp = Column(DateTime())
When querying back
Here is code that works for me:
from datetime import datetime
from sqlalchemy import Column, DateTime, Integer, create_engine
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.declarative import declarative_base
engine = create_engine('sqlite://', echo=True)
Base =
On 05/17/2012 05:09 PM, Claudio Freire wrote:
Precompiling queries in SQLA, to populate the various SQLA's compiler
caches, doing some queries that cause libpq and psycopg2 to excercise
(and thus to allocate whatever permanent data structures it needs to),
all at load time, will help keep
Thanks!
Here is a slightly modified version that shows what happens : if querying
in another session, with a from_statement, the string is not processed. Is
it the expected behaviour ?
from datetime import datetime
from sqlalchemy import Column, DateTime, Integer, create_engine
from