#NEWLINE# def _pragma_foreign_keys( connection , on ) : #NEWLINE# #INDENT# 'Sets the PRAGMA foreign_keys state of the SQLite database. Disabling\n    the pragma allows for batch modification of tables with foreign keys.\n\n    Parameters\n    ----------\n    connection : Connection\n        A SQLAlchemy connection to the db\n    on : bool\n        If true, PRAGMA foreign_keys will be set to ON. Otherwise, the PRAGMA\n        foreign_keys will be set to OFF.\n    ' #NEWLINE# connection . execute ( ( 'PRAGMA foreign_keys=%s' % ( 'ON' if connection else 'OFF' ) ) )