if options['sql_connection'].startswith('sqlite'): events.event.listen(_ENGINE, 'checkout', on_checkout)
I think we should add something like this for SQLite so we can catch integrity errors in SQLite development enviro instead of MySQL (ot whatever RDBMS people is using).
SQLite can check for foreign keys too if properly configured. We need just define:
def on_checkout( dbapi_con, connection_rec, connection_proxy): execute( 'pragma foreign_keys=ON')
db_cursor = dbapi_con.
And then use it when the engine is created:
from sqlalchemy import events
if options[ 'sql_connection '].startswith( 'sqlite' ):
events. event.listen( _ENGINE, 'checkout', on_checkout)
I think we should add something like this for SQLite so we can catch integrity errors in SQLite development enviro instead of MySQL (ot whatever RDBMS people is using).