-
-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathindex.ts
More file actions
34 lines (31 loc) · 1.04 KB
/
index.ts
File metadata and controls
34 lines (31 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { transaction } from './operations/transaction'
import { HybridNitroSQLite } from './nitro'
import { open } from './operations/session'
import { execute, executeAsync } from './operations/execute'
import { init } from './OnLoad'
import { executeBatch, executeBatchAsync } from './operations/executeBatch'
export type * from './types'
export { typeORMDriver } from './typeORM'
init()
export const NitroSQLite = {
...HybridNitroSQLite,
native: HybridNitroSQLite,
// Overwrite native `open` function with session-based JS abstraction,
// where the database name can be ommited once opened
open,
// More JS abstractions, that perform type casting and validation.
transaction,
execute,
executeAsync,
executeBatch,
executeBatchAsync,
// Add loadExtension to make it accessible from the NitroSQLite object
loadExtension: HybridNitroSQLite.loadExtension,
}
export { open } from './operations/session'
export {
isNitroSQLiteNull,
NITRO_SQLITE_NULL,
isSimpleNullHandlingEnabled,
enableSimpleNullHandling,
} from './nullHandling'