Changeset 8228


Ignore:
Timestamp:
12/04/12 16:41:34 (8 years ago)
Author:
mnagni
Message:

Complete - # 22403: CEDA Observation - ceda Internal information
 http://team.ceda.ac.uk/trac/ceda/ticket/22403

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/MolesManager/trunk/src/libs/commons_db.py

    r8222 r8228  
    2525        Represents a database instance managed by an SQLAlchemy engine.         
    2626    """ 
    27     def __init__(self, connection, script = None): 
     27    def __init__(self, connection, script = None, sql_echo=False): 
    2828        """ 
    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       
    3132        """ 
    3233        self._metadata = MetaData() 
    3334        self._connection = connection 
    3435        self._script = script 
    35         self._engine = create_engine(self._connection, echo=True) 
     36        self._engine = create_engine(self._connection, echo=sql_echo) 
    3637        self._session = None 
    3738        if self._script: 
Note: See TracChangeset for help on using the changeset viewer.