MCPcopy Create free account
hub / github.com/IQEngine/IQEngine / db

Function db

api/database/database.py:25–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23
24
25def db() -> AgnosticDatabase:
26 global _db
27 if _db is None:
28 if "IN_MEMORY_DB" in os.environ and os.environ["IN_MEMORY_DB"] != str("0"):
29 _db = create_in_memory_db_client()
30 else:
31 _db = create_db_client()
32 return _db
33
34
35async def reset_db():

Callers 6

collectionFunction · 0.90
versions_collectionFunction · 0.90
collectionFunction · 0.90
collectionFunction · 0.90
collectionFunction · 0.90
check_accessFunction · 0.90

Calls 2

create_db_clientFunction · 0.85

Tested by

no test coverage detected