- from interface_sqlite3.query_handlers import queryHandlerBasicSqlite
- # Creates the 'query handler' object (that handles communications with the DB) according to configuration specifics
- def queryHandlerFactory(dataConfig):
- if dataConfig.get('data_interface')=='sqlite3':
- return queryHandlerBasicSqlite(dataConfig)
- else:
- raise Exception('Unrecognized data interface in app configuration: ' + dataConfig.get('data_interface'))
|