@anfenn/dync 1.0.30 → 1.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -9
- package/dist/capacitor.cjs +2 -2
- package/dist/capacitor.cjs.map +1 -1
- package/dist/capacitor.d.cts +1 -1
- package/dist/capacitor.d.ts +1 -1
- package/dist/capacitor.js +1 -1
- package/dist/{chunk-SQB6E7V2.js → chunk-XAHQXK76.js} +3 -3
- package/dist/{chunk-SQB6E7V2.js.map → chunk-XAHQXK76.js.map} +1 -1
- package/dist/{dexie-T9m1mP1h.d.cts → dexie-3VOQSn1s.d.cts} +5 -5
- package/dist/{dexie-BFPA0JU2.d.ts → dexie-D85rTx4g.d.ts} +5 -5
- package/dist/dexie.d.cts +2 -2
- package/dist/dexie.d.ts +2 -2
- package/dist/expoSqlite.d.cts +1 -1
- package/dist/expoSqlite.d.ts +1 -1
- package/dist/index.cjs +11 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +11 -23
- package/dist/index.js.map +1 -1
- package/dist/node.cjs +5 -5
- package/dist/node.cjs.map +1 -1
- package/dist/node.d.cts +9 -9
- package/dist/node.d.ts +9 -9
- package/dist/node.js +4 -4
- package/dist/node.js.map +1 -1
- package/dist/react/index.d.cts +3 -3
- package/dist/react/index.d.ts +3 -3
- package/dist/{types-CSbIAfu2.d.cts → types-6-NyRQ0D.d.cts} +3 -11
- package/dist/{types-CSbIAfu2.d.ts → types-6-NyRQ0D.d.ts} +3 -11
- package/dist/{types-DW42y281.d.cts → types-BszcepJK.d.cts} +1 -1
- package/dist/{types-n8Zge2zF.d.ts → types-Dhx9MuUp.d.ts} +1 -1
- package/dist/wa-sqlite.cjs +9 -9
- package/dist/wa-sqlite.cjs.map +1 -1
- package/dist/wa-sqlite.d.cts +13 -13
- package/dist/wa-sqlite.d.ts +13 -13
- package/dist/wa-sqlite.js +8 -8
- package/dist/wa-sqlite.js.map +1 -1
- package/package.json +2 -2
- package/src/index.native.ts +1 -1
- package/src/index.shared.ts +5 -14
- package/src/index.ts +1 -1
- package/src/node.ts +1 -1
- package/src/storage/sqlite/SQLiteAdapter.ts +10 -13
- package/src/storage/sqlite/{SqliteQueryContext.ts → SQLiteQueryContext.ts} +1 -1
- package/src/storage/sqlite/drivers/{BetterSqlite3Driver.ts → BetterSQLite3Driver.ts} +8 -8
- package/src/storage/sqlite/drivers/CapacitorSQLiteDriver.ts +2 -2
- package/src/storage/sqlite/drivers/{WaSqliteDriver.ts → WaSQLiteDriver.ts} +20 -20
- package/src/storage/sqlite/index.ts +1 -1
- package/src/storage/sqlite/types.ts +2 -12
- package/src/storage/types.ts +2 -2
- package/src/wa-sqlite.ts +1 -1
|
@@ -128,12 +128,7 @@ export interface SQLiteDatabaseDriver {
|
|
|
128
128
|
query(statement: string, values?: any[]): Promise<SQLiteQueryResult>;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
export type SQLiteMigrationDirection = 'upgrade' | 'downgrade';
|
|
132
|
-
|
|
133
131
|
export interface SQLiteMigrationContext {
|
|
134
|
-
direction: SQLiteMigrationDirection;
|
|
135
|
-
fromVersion: number;
|
|
136
|
-
toVersion: number;
|
|
137
132
|
execute: (statement: string) => Promise<void>;
|
|
138
133
|
run: (statement: string, values?: any[]) => Promise<SQLiteRunResult>;
|
|
139
134
|
query: (statement: string, values?: any[]) => Promise<SQLiteQueryResult>;
|
|
@@ -142,13 +137,8 @@ export interface SQLiteMigrationContext {
|
|
|
142
137
|
export type SQLiteMigrationHandler = (context: SQLiteMigrationContext) => Promise<void> | void;
|
|
143
138
|
|
|
144
139
|
export interface SQLiteVersionMigration {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
export interface SQLiteVersionConfigurator {
|
|
150
|
-
upgrade(handler: SQLiteMigrationHandler): void;
|
|
151
|
-
downgrade(handler: SQLiteMigrationHandler): void;
|
|
140
|
+
up?: SQLiteMigrationHandler;
|
|
141
|
+
down?: SQLiteMigrationHandler;
|
|
152
142
|
}
|
|
153
143
|
|
|
154
144
|
export interface SQLiteSchemaDefinitionOptions {
|
package/src/storage/types.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { DexieQueryContext } from './dexie/DexieQueryContext';
|
|
|
2
2
|
import type { MemoryQueryContext } from './memory/MemoryQueryContext';
|
|
3
3
|
import type { TableSchemaDefinition } from './sqlite/schema';
|
|
4
4
|
import type { StorageSchemaDefinitionOptions } from './sqlite/types';
|
|
5
|
-
import type {
|
|
5
|
+
import type { SQLiteQueryContext } from './sqlite/SQLiteQueryContext';
|
|
6
6
|
|
|
7
7
|
export type TransactionMode = 'r' | 'rw';
|
|
8
8
|
|
|
@@ -15,7 +15,7 @@ export interface StorageAdapter {
|
|
|
15
15
|
defineSchema(version: number, schema: Record<string, TableSchemaDefinition>, options?: StorageSchemaDefinitionOptions): void;
|
|
16
16
|
table<T = any>(name: string): StorageTable<T>;
|
|
17
17
|
transaction<T>(mode: TransactionMode, tableNames: string[], callback: (context: StorageTransactionContext) => Promise<T>): Promise<T>;
|
|
18
|
-
query<R>(callback: (ctx: DexieQueryContext |
|
|
18
|
+
query<R>(callback: (ctx: DexieQueryContext | SQLiteQueryContext | MemoryQueryContext) => Promise<R>): Promise<R>;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export interface StorageTransactionContext {
|
package/src/wa-sqlite.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// wa-sqlite Browser SQLite Driver
|
|
2
2
|
// Import this entry point for browser/web builds with SQLite support
|
|
3
|
-
export {
|
|
3
|
+
export { WaSQLiteDriver, type WaSQLiteDriverOptions, type WaSQLiteVfsType } from './storage/sqlite/drivers/WaSQLiteDriver';
|
|
4
4
|
export type { SQLiteDatabaseDriver, SQLiteQueryResult, SQLiteRunResult } from './storage/sqlite/types';
|