MCPcopy Create free account
hub / github.com/Eve-PySpy/PySpy / connect_memory_db

Function connect_memory_db

db.py:21–33  ·  view source on GitHub ↗

Create in memory database @returns: connection and cursor objects as conn and cur

()

Source from the content-addressed store, hash-verified

19
20
21def connect_memory_db():
22 '''
23 Create in memory database
24
25 @returns: connection and cursor objects as conn and cur
26 '''
27 conn = sqlite3.connect(":memory:")
28 conn.isolation_level = None
29 cur = conn.cursor()
30 cur.execute("PRAGMA journal_mode = TRUNCATE")
31 prepare_tables(conn, cur)
32 prepare_ship_data(conn, cur)
33 return conn, cur
34
35def connect_persistent_db():
36 '''

Callers

nothing calls this directly

Calls 2

prepare_tablesFunction · 0.85
prepare_ship_dataFunction · 0.85

Tested by

no test coverage detected