MCPcopy Index your code
hub / github.com/aiscriptdev/aiscript / create_sqlite_module

Function create_sqlite_module

aiscript-vm/src/stdlib/db/sqlite.rs:18–34  ·  view source on GitHub ↗
(ctx: Context)

Source from the content-addressed store, hash-verified

16}
17
18pub fn create_sqlite_module(ctx: Context) -> ModuleKind {
19 let name = ctx.intern(b"std.db.sqlite");
20
21 let exports = [
22 ("query", Value::NativeFunction(NativeFn(sqlite_query))),
23 ("query_as", Value::NativeFunction(NativeFn(sqlite_query_as))),
24 (
25 "begin_transaction",
26 Value::NativeFunction(NativeFn(transaction::begin_transaction)),
27 ),
28 ]
29 .into_iter()
30 .map(|(name, f)| (ctx.intern_static(name), f))
31 .collect();
32
33 ModuleKind::Native { name, exports }
34}
35
36fn column_to_value<'gc>(
37 ctx: Context<'gc>,

Callers 1

init_stdlibMethod · 0.85

Calls 3

NativeFnClass · 0.85
internMethod · 0.45
intern_staticMethod · 0.45

Tested by

no test coverage detected