MCPcopy Create free account
hub / github.com/asg017/sqlite-loadable-rs / connect

Function connect

examples/test-examples.py:7–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5
6
7def connect():
8 db = sqlite3.connect(":memory:")
9
10 db.execute("create table base_functions as select name from pragma_function_list")
11 db.execute("create table base_modules as select name from pragma_module_list")
12
13 db.enable_load_extension(True)
14 try:
15 db.load_extension("target/debug/examples/libhello")
16 except:
17 # windows
18 db.load_extension("target/debug/examples/hello")
19
20 db.execute("create temp table loaded_functions as select name from pragma_function_list where name not in (select name from base_functions) order by name")
21 db.execute("create temp table loaded_modules as select name from pragma_module_list where name not in (select name from base_modules) order by name")
22
23 db.row_factory = sqlite3.Row
24 return db
25
26
27db = connect()

Callers 3

test-examples.pyFile · 0.70
createMethod · 0.50
rust_connectFunction · 0.50

Calls 2

executeMethod · 0.80
connectMethod · 0.45

Tested by

no test coverage detected