MCPcopy Index your code
hub / github.com/ormar-orm/ormar / set_sqlite_pragma

Method set_sqlite_pragma

ormar/databases/connection.py:62–65  ·  view source on GitHub ↗
(dbapi_conn: Any, connection_record: Any)

Source from the content-addressed store, hash-verified

60
61 @event.listens_for(self._engine.sync_engine, "connect")
62 def set_sqlite_pragma(dbapi_conn: Any, connection_record: Any) -> None:
63 cursor = dbapi_conn.cursor()
64 cursor.execute("PRAGMA foreign_keys=ON")
65 cursor.close()
66
67 if self._force_rollback:
68 assert self._global_transaction is None

Callers

nothing calls this directly

Calls 1

executeMethod · 0.80

Tested by

no test coverage detected