MCPcopy
hub / github.com/MikeChongCan/scylla / create_connection

Function create_connection

scylla/database.py:13–24  ·  view source on GitHub ↗

create a database connection :rtype: SqliteDatabase

()

Source from the content-addressed store, hash-verified

11
12
13def create_connection() -> SqliteDatabase:
14 """
15 create a database connection
16 :rtype: SqliteDatabase
17 """
18 global _db
19 if _db:
20 return _db
21 else:
22 logger.debug('create new db connection')
23 _db = SqliteDatabase(get_config('db_path', './scylla.db'))
24 return _db
25
26
27def create_db_tables():

Callers 4

test_create_connectionFunction · 0.90
_create_db_fileFunction · 0.90
create_db_tablesFunction · 0.85
MetaClass · 0.85

Calls 1

get_configFunction · 0.90

Tested by 2

test_create_connectionFunction · 0.72
_create_db_fileFunction · 0.72