(ctx: Context)
| 16 | } |
| 17 | |
| 18 | pub 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 | |
| 36 | fn column_to_value<'gc>( |
| 37 | ctx: Context<'gc>, |
no test coverage detected