Changeset 8228
- Timestamp:
- 12/04/12 16:41:34 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mauRepo/MolesManager/trunk/src/libs/commons_db.py
r8222 r8228 25 25 Represents a database instance managed by an SQLAlchemy engine. 26 26 """ 27 def __init__(self, connection, script = None ):27 def __init__(self, connection, script = None, sql_echo=False): 28 28 """ 29 :param connection: the URL used to open a connection to the database 30 :param script: a python module defining the classes mapping 29 @param connection: the URL used to open a connection to the database 30 @param script: a python module defining the classes mapping 31 @param sql_echo: sets the SQLalchemy create_engine.echo param. Default is False 31 32 """ 32 33 self._metadata = MetaData() 33 34 self._connection = connection 34 35 self._script = script 35 self._engine = create_engine(self._connection, echo= True)36 self._engine = create_engine(self._connection, echo=sql_echo) 36 37 self._session = None 37 38 if self._script:
Note: See TracChangeset
for help on using the changeset viewer.