-
-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathNitroSQLite.nitro.ts
More file actions
43 lines (42 loc) · 1.25 KB
/
NitroSQLite.nitro.ts
File metadata and controls
43 lines (42 loc) · 1.25 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
35
36
37
38
39
40
41
42
43
import type { HybridObject } from 'react-native-nitro-modules'
import type {
BatchQueryResult,
FileLoadResult,
NativeSQLiteQueryParams,
NativeBatchQueryCommand,
} from '../types'
import type { NativeQueryResult } from './NativeQueryResult.nitro'
export interface NitroSQLite
extends HybridObject<{ ios: 'c++'; android: 'c++' }> {
open(dbName: string, location?: string): void
close(dbName: string): void
drop(dbName: string, location?: string): void
attach(
mainDbName: string,
dbNameToAttach: string,
alias: string,
location?: string
): void
detach(mainDbName: string, alias: string): void
execute(
dbName: string,
query: string,
params?: NativeSQLiteQueryParams
): NativeQueryResult
executeAsync(
dbName: string,
query: string,
params?: NativeSQLiteQueryParams
): Promise<NativeQueryResult>
executeBatch(
dbName: string,
commands: NativeBatchQueryCommand[]
): BatchQueryResult
executeBatchAsync(
dbName: string,
commands: NativeBatchQueryCommand[]
): Promise<BatchQueryResult>
loadFile(dbName: string, location: string): FileLoadResult
loadFileAsync(dbName: string, location: string): Promise<FileLoadResult>
loadExtension(dbName: string, path: string, entryPoint?: string): void
}