@trust0/ridb-core 1.3.1 → 1.4.0-rc.2
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/package.json +2 -2
- package/pkg/ridb_core.d.ts +251 -251
- package/pkg/ridb_core.js +124 -115
- package/pkg/ridb_core_bg.wasm +0 -0
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trust0/ridb-core",
|
|
3
|
-
"description": "RIDB core",
|
|
3
|
+
"description": "RIDB core update",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
|
-
"version": "1.
|
|
8
|
+
"version": "1.4.0-rc.2",
|
|
9
9
|
"main": "./pkg/ridb_core.js",
|
|
10
10
|
"types": "./pkg/ridb_core.d.ts",
|
|
11
11
|
"sideEffects": [
|
package/pkg/ridb_core.d.ts
CHANGED
|
@@ -99,6 +99,52 @@ export class Query<T extends SchemaType> {
|
|
|
99
99
|
|
|
100
100
|
|
|
101
101
|
|
|
102
|
+
/**
|
|
103
|
+
* Represents an IndexDB storage system extending the base storage functionality.
|
|
104
|
+
*
|
|
105
|
+
* @template T - The schema type.
|
|
106
|
+
*/
|
|
107
|
+
export class IndexDB<T extends SchemaTypeRecord> extends BaseStorage<T> {
|
|
108
|
+
/**
|
|
109
|
+
* Frees the resources used by the in-memory storage.
|
|
110
|
+
*/
|
|
111
|
+
free(): void;
|
|
112
|
+
|
|
113
|
+
static create<SchemasCreate extends SchemaTypeRecord>(
|
|
114
|
+
dbName: string,
|
|
115
|
+
schemas: SchemasCreate,
|
|
116
|
+
): Promise<
|
|
117
|
+
IndexDB<
|
|
118
|
+
SchemasCreate
|
|
119
|
+
>
|
|
120
|
+
>;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Represents an in-memory storage system extending the base storage functionality.
|
|
127
|
+
*
|
|
128
|
+
* @template T - The schema type.
|
|
129
|
+
*/
|
|
130
|
+
export class InMemory<T extends SchemaTypeRecord> extends BaseStorage<T> {
|
|
131
|
+
/**
|
|
132
|
+
* Frees the resources used by the in-memory storage.
|
|
133
|
+
*/
|
|
134
|
+
free(): void;
|
|
135
|
+
|
|
136
|
+
static create<SchemasCreate extends SchemaTypeRecord>(
|
|
137
|
+
dbName: string,
|
|
138
|
+
schemas: SchemasCreate,
|
|
139
|
+
): Promise<
|
|
140
|
+
InMemory<
|
|
141
|
+
SchemasCreate
|
|
142
|
+
>
|
|
143
|
+
>;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
102
148
|
export type InternalsRecord = {
|
|
103
149
|
[name: string]: BaseStorage<SchemaTypeRecord>
|
|
104
150
|
};
|
|
@@ -198,6 +244,61 @@ export class Collection<T extends SchemaType> {
|
|
|
198
244
|
|
|
199
245
|
|
|
200
246
|
|
|
247
|
+
export type BaseStorageOptions = {
|
|
248
|
+
[name:string]:string | boolean | number
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export class BaseStorage<Schemas extends SchemaTypeRecord> extends StorageInternal<Schemas> {
|
|
252
|
+
static create<SchemasCreate extends SchemaTypeRecord>(
|
|
253
|
+
dbName: string,
|
|
254
|
+
schemas: SchemasCreate,
|
|
255
|
+
options?: BaseStorageOptions
|
|
256
|
+
): Promise<
|
|
257
|
+
BaseStorage<
|
|
258
|
+
SchemasCreate
|
|
259
|
+
>
|
|
260
|
+
>;
|
|
261
|
+
constructor(
|
|
262
|
+
dbName: string,
|
|
263
|
+
schemas: Schemas,
|
|
264
|
+
options?: BaseStorageOptions
|
|
265
|
+
);
|
|
266
|
+
readonly dbName: string;
|
|
267
|
+
readonly schemas: Record<keyof Schemas, Schema<Schemas[keyof Schemas]>>;
|
|
268
|
+
readonly options: BaseStorageOptions;
|
|
269
|
+
readonly core: CoreStorage;
|
|
270
|
+
start(): Promise<void>;
|
|
271
|
+
close(): Promise<void>;
|
|
272
|
+
count(colectionName: keyof Schemas, query: QueryType<Schemas[keyof Schemas]>, options?: QueryOptions): Promise<number>;
|
|
273
|
+
findDocumentById(collectionName: keyof Schemas, id: string): Promise<Doc<Schemas[keyof Schemas]> | null | undefined>;
|
|
274
|
+
find(collectionName: keyof Schemas, query: QueryType<Schemas[keyof Schemas]>, options?: QueryOptions): Promise<Doc<Schemas[keyof Schemas]>[]>;
|
|
275
|
+
write(op: Operation<Schemas[keyof Schemas]>): Promise<Doc<Schemas[keyof Schemas]>>;
|
|
276
|
+
getOption(name: string): string | boolean | number | undefined;
|
|
277
|
+
getSchema(name: string): Schema<any>;
|
|
278
|
+
//Call addIndexSchemas if you need extra indexing schemas for your database
|
|
279
|
+
addIndexSchemas(): null
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
type Hook = (
|
|
285
|
+
schema: Schema<SchemaType>,
|
|
286
|
+
migration: MigrationPathsForSchema<SchemaType>,
|
|
287
|
+
doc: Doc<SchemaType>
|
|
288
|
+
) => Doc<SchemaType>
|
|
289
|
+
|
|
290
|
+
type BasePluginOptions = {
|
|
291
|
+
docCreateHook?: Hook,
|
|
292
|
+
docRecoverHook?: Hook
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export class BasePlugin implements BasePluginOptions {
|
|
296
|
+
docCreateHook?:Hook;
|
|
297
|
+
docRecoverHook?:Hook;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
201
302
|
/**
|
|
202
303
|
* Represents a property within a schema, including various constraints and nested properties.
|
|
203
304
|
*/
|
|
@@ -262,29 +363,6 @@ export class Property {
|
|
|
262
363
|
|
|
263
364
|
|
|
264
365
|
|
|
265
|
-
/**
|
|
266
|
-
* Represents an IndexDB storage system extending the base storage functionality.
|
|
267
|
-
*
|
|
268
|
-
* @template T - The schema type.
|
|
269
|
-
*/
|
|
270
|
-
export class IndexDB<T extends SchemaTypeRecord> extends BaseStorage<T> {
|
|
271
|
-
/**
|
|
272
|
-
* Frees the resources used by the in-memory storage.
|
|
273
|
-
*/
|
|
274
|
-
free(): void;
|
|
275
|
-
|
|
276
|
-
static create<SchemasCreate extends SchemaTypeRecord>(
|
|
277
|
-
dbName: string,
|
|
278
|
-
schemas: SchemasCreate,
|
|
279
|
-
): Promise<
|
|
280
|
-
IndexDB<
|
|
281
|
-
SchemasCreate
|
|
282
|
-
>
|
|
283
|
-
>;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
366
|
/**
|
|
289
367
|
* Represents the type definition for a schema.
|
|
290
368
|
*/
|
|
@@ -394,105 +472,30 @@ export class Schema<T extends SchemaType> {
|
|
|
394
472
|
|
|
395
473
|
|
|
396
474
|
/**
|
|
397
|
-
* Represents
|
|
398
|
-
* RIDB extends from this class and is used to expose collections.
|
|
399
|
-
*
|
|
400
|
-
* So if you specify:
|
|
401
|
-
* ```typescript
|
|
402
|
-
* const db = new RIDB(
|
|
403
|
-
* {
|
|
404
|
-
* schemas: {
|
|
405
|
-
* demo: {
|
|
406
|
-
* version: 0,
|
|
407
|
-
* primaryKey: 'id',
|
|
408
|
-
* type: SchemaFieldType.object,
|
|
409
|
-
* properties: {
|
|
410
|
-
* id: {
|
|
411
|
-
* type: SchemaFieldType.string,
|
|
412
|
-
* maxLength: 60
|
|
413
|
-
* }
|
|
414
|
-
* }
|
|
415
|
-
* }
|
|
416
|
-
* } as const
|
|
417
|
-
* }
|
|
418
|
-
* )
|
|
419
|
-
* ```
|
|
420
|
-
*
|
|
421
|
-
* The collection will be available as `db.collections.demo` and all the methods for the collection (find, count, findById, update, create, delete) will be available.
|
|
475
|
+
* Represents an operation to be performed on a collection.
|
|
422
476
|
*
|
|
423
|
-
* @template T -
|
|
477
|
+
* @template T - The schema type of the collection.
|
|
424
478
|
*/
|
|
425
|
-
export
|
|
426
|
-
|
|
479
|
+
export type Operation<T extends SchemaType> = {
|
|
427
480
|
/**
|
|
428
|
-
*
|
|
429
|
-
*
|
|
430
|
-
* @template TS - A record of schema types.
|
|
431
|
-
* @param {TS} schemas - The schemas to use for the collections.
|
|
432
|
-
* @param migrations
|
|
433
|
-
* @param plugins
|
|
434
|
-
* @param options
|
|
435
|
-
* @param password
|
|
436
|
-
* @returns {Promise<Database<TS>>} A promise that resolves to the created `Database` instance.
|
|
481
|
+
* The name of the collection on which the operation will be performed.
|
|
437
482
|
*/
|
|
438
|
-
|
|
439
|
-
db_name: string,
|
|
440
|
-
schemas: TS,
|
|
441
|
-
migrations: MigrationPathsForSchemas<TS> | MigrationPathsForSchema<TS[string]>,
|
|
442
|
-
plugins:Array<typeof BasePlugin>,
|
|
443
|
-
options: RIDBModule,
|
|
444
|
-
password?:string,
|
|
445
|
-
storage?: BaseStorage<TS>
|
|
446
|
-
): Promise<Database<TS>>;
|
|
483
|
+
collection: string,
|
|
447
484
|
|
|
448
485
|
/**
|
|
449
|
-
* The
|
|
450
|
-
*
|
|
451
|
-
* This is a read-only property where the key is the name of the collection and the value is a `Collection` instance.
|
|
486
|
+
* The type of operation to be performed (e.g., CREATE, UPDATE, DELETE).
|
|
452
487
|
*/
|
|
453
|
-
|
|
454
|
-
[name in keyof T]: Collection<Schema<T[name]>>
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
readonly started: boolean;
|
|
488
|
+
opType: OpType,
|
|
458
489
|
|
|
459
490
|
/**
|
|
460
|
-
*
|
|
461
|
-
*
|
|
462
|
-
* @returns {Promise<void>} A promise that resolves when the database is started.
|
|
491
|
+
* The data involved in the operation, conforming to the schema type.
|
|
463
492
|
*/
|
|
464
|
-
|
|
493
|
+
data: Doc<T>,
|
|
465
494
|
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
*
|
|
469
|
-
* @returns {Promise<void>} A promise that resolves when the database is closed.
|
|
470
|
-
*/
|
|
471
|
-
close(): Promise<void>;
|
|
495
|
+
primaryKeyField?: string,
|
|
496
|
+
primaryKey?: string
|
|
472
497
|
}
|
|
473
498
|
|
|
474
|
-
/**
|
|
475
|
-
* Represents a function type for creating storage with the provided schema type records.
|
|
476
|
-
*
|
|
477
|
-
* @template T - The schema type record.
|
|
478
|
-
* @param {T} records - The schema type records.
|
|
479
|
-
* @returns {Promise<InternalsRecord>} A promise that resolves to the created internals record.
|
|
480
|
-
*/
|
|
481
|
-
export type CreateStorage = <T extends SchemaTypeRecord>(
|
|
482
|
-
records: T
|
|
483
|
-
) => Promise<BaseStorage<T>>;
|
|
484
|
-
|
|
485
|
-
/**
|
|
486
|
-
* Represents a storage module with a method for creating storage.
|
|
487
|
-
*/
|
|
488
|
-
export type RIDBModule = {
|
|
489
|
-
|
|
490
|
-
/**
|
|
491
|
-
* Plugin constructors array
|
|
492
|
-
*/
|
|
493
|
-
apply: (plugins:Array<typeof BasePlugin>) => Array<BasePlugin>;
|
|
494
|
-
};
|
|
495
|
-
|
|
496
499
|
|
|
497
500
|
|
|
498
501
|
export type EnumerateUpTo<
|
|
@@ -543,84 +546,6 @@ export type MigrationsParameter<
|
|
|
543
546
|
|
|
544
547
|
|
|
545
548
|
|
|
546
|
-
/**
|
|
547
|
-
* Represents an in-memory storage system extending the base storage functionality.
|
|
548
|
-
*
|
|
549
|
-
* @template T - The schema type.
|
|
550
|
-
*/
|
|
551
|
-
export class InMemory<T extends SchemaTypeRecord> extends BaseStorage<T> {
|
|
552
|
-
/**
|
|
553
|
-
* Frees the resources used by the in-memory storage.
|
|
554
|
-
*/
|
|
555
|
-
free(): void;
|
|
556
|
-
|
|
557
|
-
static create<SchemasCreate extends SchemaTypeRecord>(
|
|
558
|
-
dbName: string,
|
|
559
|
-
schemas: SchemasCreate,
|
|
560
|
-
): Promise<
|
|
561
|
-
InMemory<
|
|
562
|
-
SchemasCreate
|
|
563
|
-
>
|
|
564
|
-
>;
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
type Hook = (
|
|
570
|
-
schema: Schema<SchemaType>,
|
|
571
|
-
migration: MigrationPathsForSchema<SchemaType>,
|
|
572
|
-
doc: Doc<SchemaType>
|
|
573
|
-
) => Doc<SchemaType>
|
|
574
|
-
|
|
575
|
-
type BasePluginOptions = {
|
|
576
|
-
docCreateHook?: Hook,
|
|
577
|
-
docRecoverHook?: Hook
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
export class BasePlugin implements BasePluginOptions {
|
|
581
|
-
docCreateHook?:Hook;
|
|
582
|
-
docRecoverHook?:Hook;
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
export type BaseStorageOptions = {
|
|
588
|
-
[name:string]:string | boolean | number
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
export class BaseStorage<Schemas extends SchemaTypeRecord> extends StorageInternal<Schemas> {
|
|
592
|
-
static create<SchemasCreate extends SchemaTypeRecord>(
|
|
593
|
-
dbName: string,
|
|
594
|
-
schemas: SchemasCreate,
|
|
595
|
-
options?: BaseStorageOptions
|
|
596
|
-
): Promise<
|
|
597
|
-
BaseStorage<
|
|
598
|
-
SchemasCreate
|
|
599
|
-
>
|
|
600
|
-
>;
|
|
601
|
-
constructor(
|
|
602
|
-
dbName: string,
|
|
603
|
-
schemas: Schemas,
|
|
604
|
-
options?: BaseStorageOptions
|
|
605
|
-
);
|
|
606
|
-
readonly dbName: string;
|
|
607
|
-
readonly schemas: Record<keyof Schemas, Schema<Schemas[keyof Schemas]>>;
|
|
608
|
-
readonly options: BaseStorageOptions;
|
|
609
|
-
readonly core: CoreStorage;
|
|
610
|
-
start(): Promise<void>;
|
|
611
|
-
close(): Promise<void>;
|
|
612
|
-
count(colectionName: keyof Schemas, query: QueryType<Schemas[keyof Schemas]>, options?: QueryOptions): Promise<number>;
|
|
613
|
-
findDocumentById(collectionName: keyof Schemas, id: string): Promise<Doc<Schemas[keyof Schemas]> | null | undefined>;
|
|
614
|
-
find(collectionName: keyof Schemas, query: QueryType<Schemas[keyof Schemas]>, options?: QueryOptions): Promise<Doc<Schemas[keyof Schemas]>[]>;
|
|
615
|
-
write(op: Operation<Schemas[keyof Schemas]>): Promise<Doc<Schemas[keyof Schemas]>>;
|
|
616
|
-
getOption(name: string): string | boolean | number | undefined;
|
|
617
|
-
getSchema(name: string): Schema<any>;
|
|
618
|
-
//Call addIndexSchemas if you need extra indexing schemas for your database
|
|
619
|
-
addIndexSchemas(): null
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
549
|
/**
|
|
625
550
|
* Represents a record of schema types, where each key is a string and the value is a `SchemaType`.
|
|
626
551
|
*/
|
|
@@ -669,30 +594,105 @@ export class CoreStorage {
|
|
|
669
594
|
|
|
670
595
|
|
|
671
596
|
/**
|
|
672
|
-
* Represents
|
|
597
|
+
* Represents a database containing collections of documents.
|
|
598
|
+
* RIDB extends from this class and is used to expose collections.
|
|
599
|
+
*
|
|
600
|
+
* So if you specify:
|
|
601
|
+
* ```typescript
|
|
602
|
+
* const db = new RIDB(
|
|
603
|
+
* {
|
|
604
|
+
* schemas: {
|
|
605
|
+
* demo: {
|
|
606
|
+
* version: 0,
|
|
607
|
+
* primaryKey: 'id',
|
|
608
|
+
* type: SchemaFieldType.object,
|
|
609
|
+
* properties: {
|
|
610
|
+
* id: {
|
|
611
|
+
* type: SchemaFieldType.string,
|
|
612
|
+
* maxLength: 60
|
|
613
|
+
* }
|
|
614
|
+
* }
|
|
615
|
+
* }
|
|
616
|
+
* } as const
|
|
617
|
+
* }
|
|
618
|
+
* )
|
|
619
|
+
* ```
|
|
620
|
+
*
|
|
621
|
+
* The collection will be available as `db.collections.demo` and all the methods for the collection (find, count, findById, update, create, delete) will be available.
|
|
673
622
|
*
|
|
674
|
-
* @template T -
|
|
623
|
+
* @template T - A record of schema types.
|
|
675
624
|
*/
|
|
676
|
-
export
|
|
625
|
+
export class Database<T extends SchemaTypeRecord> {
|
|
626
|
+
|
|
677
627
|
/**
|
|
678
|
-
*
|
|
628
|
+
* Creates a new `Database` instance with the provided schemas and storage module.
|
|
629
|
+
*
|
|
630
|
+
* @template TS - A record of schema types.
|
|
631
|
+
* @param {TS} schemas - The schemas to use for the collections.
|
|
632
|
+
* @param migrations
|
|
633
|
+
* @param plugins
|
|
634
|
+
* @param options
|
|
635
|
+
* @param password
|
|
636
|
+
* @returns {Promise<Database<TS>>} A promise that resolves to the created `Database` instance.
|
|
679
637
|
*/
|
|
680
|
-
|
|
638
|
+
static create<TS extends SchemaTypeRecord>(
|
|
639
|
+
db_name: string,
|
|
640
|
+
schemas: TS,
|
|
641
|
+
migrations: MigrationPathsForSchemas<TS> | MigrationPathsForSchema<TS[string]>,
|
|
642
|
+
plugins:Array<typeof BasePlugin>,
|
|
643
|
+
options: RIDBModule,
|
|
644
|
+
password?:string,
|
|
645
|
+
storage?: BaseStorage<TS>
|
|
646
|
+
): Promise<Database<TS>>;
|
|
681
647
|
|
|
682
648
|
/**
|
|
683
|
-
* The
|
|
649
|
+
* The collections in the database.
|
|
650
|
+
*
|
|
651
|
+
* This is a read-only property where the key is the name of the collection and the value is a `Collection` instance.
|
|
684
652
|
*/
|
|
685
|
-
|
|
653
|
+
readonly collections: {
|
|
654
|
+
[name in keyof T]: Collection<Schema<T[name]>>
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
readonly started: boolean;
|
|
686
658
|
|
|
687
659
|
/**
|
|
688
|
-
*
|
|
660
|
+
* Starts the database.
|
|
661
|
+
*
|
|
662
|
+
* @returns {Promise<void>} A promise that resolves when the database is started.
|
|
689
663
|
*/
|
|
690
|
-
|
|
664
|
+
start(): Promise<void>;
|
|
691
665
|
|
|
692
|
-
|
|
693
|
-
|
|
666
|
+
/**
|
|
667
|
+
* Closes the database.
|
|
668
|
+
*
|
|
669
|
+
* @returns {Promise<void>} A promise that resolves when the database is closed.
|
|
670
|
+
*/
|
|
671
|
+
close(): Promise<void>;
|
|
694
672
|
}
|
|
695
673
|
|
|
674
|
+
/**
|
|
675
|
+
* Represents a function type for creating storage with the provided schema type records.
|
|
676
|
+
*
|
|
677
|
+
* @template T - The schema type record.
|
|
678
|
+
* @param {T} records - The schema type records.
|
|
679
|
+
* @returns {Promise<InternalsRecord>} A promise that resolves to the created internals record.
|
|
680
|
+
*/
|
|
681
|
+
export type CreateStorage = <T extends SchemaTypeRecord>(
|
|
682
|
+
records: T
|
|
683
|
+
) => Promise<BaseStorage<T>>;
|
|
684
|
+
|
|
685
|
+
/**
|
|
686
|
+
* Represents a storage module with a method for creating storage.
|
|
687
|
+
*/
|
|
688
|
+
export type RIDBModule = {
|
|
689
|
+
|
|
690
|
+
/**
|
|
691
|
+
* Plugin constructors array
|
|
692
|
+
*/
|
|
693
|
+
apply: (plugins:Array<typeof BasePlugin>) => Array<BasePlugin>;
|
|
694
|
+
};
|
|
695
|
+
|
|
696
696
|
|
|
697
697
|
/**
|
|
698
698
|
* Runtime test harness support instantiated in JS.
|
|
@@ -772,6 +772,27 @@ export interface InitOutput {
|
|
|
772
772
|
readonly __wbgt_test_query_parse_eq_operator_wrong_type_32: (a: number) => void;
|
|
773
773
|
readonly __wbgt_test_query_parse_ne_operator_33: (a: number) => void;
|
|
774
774
|
readonly __wbgt_test_query_parse_ne_operator_wrong_type_34: (a: number) => void;
|
|
775
|
+
readonly __wbg_indexdb_free: (a: number) => void;
|
|
776
|
+
readonly indexdb_get_stores: (a: number, b: number) => void;
|
|
777
|
+
readonly indexdb_get_store: (a: number, b: number, c: number, d: number) => void;
|
|
778
|
+
readonly indexdb_create: (a: number, b: number, c: number) => number;
|
|
779
|
+
readonly indexdb_write: (a: number, b: number) => number;
|
|
780
|
+
readonly indexdb_find: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
781
|
+
readonly indexdb_findDocumentById: (a: number, b: number, c: number, d: number) => number;
|
|
782
|
+
readonly indexdb_count: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
783
|
+
readonly indexdb_close: (a: number) => number;
|
|
784
|
+
readonly indexdb_start: (a: number) => number;
|
|
785
|
+
readonly __wbg_inmemory_free: (a: number) => void;
|
|
786
|
+
readonly inmemory_create: (a: number, b: number, c: number) => number;
|
|
787
|
+
readonly inmemory_write: (a: number, b: number) => number;
|
|
788
|
+
readonly inmemory_find: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
789
|
+
readonly inmemory_findDocumentById: (a: number, b: number, c: number, d: number) => number;
|
|
790
|
+
readonly inmemory_count: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
791
|
+
readonly inmemory_close: (a: number) => number;
|
|
792
|
+
readonly inmemory_start: (a: number) => number;
|
|
793
|
+
readonly __wbg_queryoptions_free: (a: number) => void;
|
|
794
|
+
readonly queryoptions_limit: (a: number, b: number) => void;
|
|
795
|
+
readonly queryoptions_offset: (a: number, b: number) => void;
|
|
775
796
|
readonly __wbg_collection_free: (a: number) => void;
|
|
776
797
|
readonly collection_name: (a: number, b: number) => void;
|
|
777
798
|
readonly collection_schema: (a: number, b: number) => void;
|
|
@@ -782,6 +803,21 @@ export interface InitOutput {
|
|
|
782
803
|
readonly collection_update: (a: number, b: number) => number;
|
|
783
804
|
readonly collection_create: (a: number, b: number) => number;
|
|
784
805
|
readonly collection_delete: (a: number, b: number) => number;
|
|
806
|
+
readonly __wbg_basestorage_free: (a: number) => void;
|
|
807
|
+
readonly basestorage_new: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
808
|
+
readonly basestorage_addIndexSchemas: (a: number, b: number) => void;
|
|
809
|
+
readonly basestorage_getOption: (a: number, b: number, c: number, d: number) => void;
|
|
810
|
+
readonly basestorage_getSchema: (a: number, b: number, c: number, d: number) => void;
|
|
811
|
+
readonly basestorage_core: (a: number, b: number) => void;
|
|
812
|
+
readonly __wbg_baseplugin_free: (a: number) => void;
|
|
813
|
+
readonly baseplugin_new: (a: number, b: number, c: number) => void;
|
|
814
|
+
readonly baseplugin_name: (a: number) => number;
|
|
815
|
+
readonly baseplugin_get_doc_create_hook: (a: number) => number;
|
|
816
|
+
readonly baseplugin_get_doc_recover_hook: (a: number) => number;
|
|
817
|
+
readonly baseplugin_set_doc_create_hook: (a: number, b: number) => void;
|
|
818
|
+
readonly baseplugin_set_doc_recover_hook: (a: number, b: number) => void;
|
|
819
|
+
readonly main_js: () => void;
|
|
820
|
+
readonly is_debug_mode: () => number;
|
|
785
821
|
readonly __wbg_property_free: (a: number) => void;
|
|
786
822
|
readonly property_is_valid: (a: number, b: number) => void;
|
|
787
823
|
readonly property_type: (a: number) => number;
|
|
@@ -794,16 +830,6 @@ export interface InitOutput {
|
|
|
794
830
|
readonly __wbgt_test_property_creation_0: (a: number) => void;
|
|
795
831
|
readonly __wbgt_test_property_validation_1: (a: number) => void;
|
|
796
832
|
readonly __wbgt_test_invalid_property_2: (a: number) => void;
|
|
797
|
-
readonly __wbg_indexdb_free: (a: number) => void;
|
|
798
|
-
readonly indexdb_get_stores: (a: number, b: number) => void;
|
|
799
|
-
readonly indexdb_get_store: (a: number, b: number, c: number, d: number) => void;
|
|
800
|
-
readonly indexdb_create: (a: number, b: number, c: number) => number;
|
|
801
|
-
readonly indexdb_write: (a: number, b: number) => number;
|
|
802
|
-
readonly indexdb_find: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
803
|
-
readonly indexdb_findDocumentById: (a: number, b: number, c: number, d: number) => number;
|
|
804
|
-
readonly indexdb_count: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
805
|
-
readonly indexdb_close: (a: number) => number;
|
|
806
|
-
readonly indexdb_start: (a: number) => number;
|
|
807
833
|
readonly __wbg_schema_free: (a: number) => void;
|
|
808
834
|
readonly schema_validate: (a: number, b: number, c: number) => void;
|
|
809
835
|
readonly schema_is_valid: (a: number, b: number) => void;
|
|
@@ -817,40 +843,6 @@ export interface InitOutput {
|
|
|
817
843
|
readonly __wbgt_test_schema_creation_3: (a: number) => void;
|
|
818
844
|
readonly __wbgt_test_schema_validation_4: (a: number) => void;
|
|
819
845
|
readonly __wbgt_test_invalid_schema_5: (a: number) => void;
|
|
820
|
-
readonly __wbg_database_free: (a: number) => void;
|
|
821
|
-
readonly database_start: (a: number) => number;
|
|
822
|
-
readonly database_close: (a: number) => number;
|
|
823
|
-
readonly database_started: (a: number) => number;
|
|
824
|
-
readonly database_collections: (a: number, b: number) => void;
|
|
825
|
-
readonly database_create: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => number;
|
|
826
|
-
readonly __wbg_queryoptions_free: (a: number) => void;
|
|
827
|
-
readonly queryoptions_limit: (a: number, b: number) => void;
|
|
828
|
-
readonly queryoptions_offset: (a: number, b: number) => void;
|
|
829
|
-
readonly __wbg_inmemory_free: (a: number) => void;
|
|
830
|
-
readonly inmemory_create: (a: number, b: number, c: number) => number;
|
|
831
|
-
readonly inmemory_write: (a: number, b: number) => number;
|
|
832
|
-
readonly inmemory_find: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
833
|
-
readonly inmemory_findDocumentById: (a: number, b: number, c: number, d: number) => number;
|
|
834
|
-
readonly inmemory_count: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
835
|
-
readonly inmemory_close: (a: number) => number;
|
|
836
|
-
readonly inmemory_start: (a: number) => number;
|
|
837
|
-
readonly __wbg_baseplugin_free: (a: number) => void;
|
|
838
|
-
readonly baseplugin_new: (a: number, b: number, c: number) => void;
|
|
839
|
-
readonly baseplugin_name: (a: number) => number;
|
|
840
|
-
readonly baseplugin_get_doc_create_hook: (a: number) => number;
|
|
841
|
-
readonly baseplugin_get_doc_recover_hook: (a: number) => number;
|
|
842
|
-
readonly baseplugin_set_doc_create_hook: (a: number, b: number) => void;
|
|
843
|
-
readonly baseplugin_set_doc_recover_hook: (a: number, b: number) => void;
|
|
844
|
-
readonly __wbg_basestorage_free: (a: number) => void;
|
|
845
|
-
readonly basestorage_new: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
846
|
-
readonly basestorage_addIndexSchemas: (a: number, b: number) => void;
|
|
847
|
-
readonly basestorage_getOption: (a: number, b: number, c: number, d: number) => void;
|
|
848
|
-
readonly basestorage_getSchema: (a: number, b: number, c: number, d: number) => void;
|
|
849
|
-
readonly basestorage_core: (a: number, b: number) => void;
|
|
850
|
-
readonly corestorage_new: () => number;
|
|
851
|
-
readonly corestorage_getPrimaryKeyTyped: (a: number, b: number, c: number) => void;
|
|
852
|
-
readonly corestorage_getIndexes: (a: number, b: number, c: number, d: number) => void;
|
|
853
|
-
readonly corestorage_matchesQuery: (a: number, b: number, c: number, d: number) => void;
|
|
854
846
|
readonly __wbg_operation_free: (a: number) => void;
|
|
855
847
|
readonly operation_collection: (a: number, b: number) => void;
|
|
856
848
|
readonly operation_opType: (a: number) => number;
|
|
@@ -858,8 +850,16 @@ export interface InitOutput {
|
|
|
858
850
|
readonly operation_primaryKeyField: (a: number) => number;
|
|
859
851
|
readonly operation_primaryKey: (a: number) => number;
|
|
860
852
|
readonly operation_primaryKeyIndex: (a: number, b: number) => void;
|
|
861
|
-
readonly
|
|
862
|
-
readonly
|
|
853
|
+
readonly corestorage_new: () => number;
|
|
854
|
+
readonly corestorage_getPrimaryKeyTyped: (a: number, b: number, c: number) => void;
|
|
855
|
+
readonly corestorage_getIndexes: (a: number, b: number, c: number, d: number) => void;
|
|
856
|
+
readonly corestorage_matchesQuery: (a: number, b: number, c: number, d: number) => void;
|
|
857
|
+
readonly __wbg_database_free: (a: number) => void;
|
|
858
|
+
readonly database_start: (a: number) => number;
|
|
859
|
+
readonly database_close: (a: number) => number;
|
|
860
|
+
readonly database_started: (a: number) => number;
|
|
861
|
+
readonly database_collections: (a: number, b: number) => void;
|
|
862
|
+
readonly database_create: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => number;
|
|
863
863
|
readonly __wbg_corestorage_free: (a: number) => void;
|
|
864
864
|
readonly __wbg_wasmbindgentestcontext_free: (a: number) => void;
|
|
865
865
|
readonly wasmbindgentestcontext_new: () => number;
|
|
@@ -873,16 +873,16 @@ export interface InitOutput {
|
|
|
873
873
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
874
874
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
875
875
|
readonly __wbindgen_export_2: WebAssembly.Table;
|
|
876
|
-
readonly
|
|
876
|
+
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h231d9c59fed64ed4: (a: number, b: number, c: number) => void;
|
|
877
877
|
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
878
|
-
readonly
|
|
879
|
-
readonly
|
|
880
|
-
readonly
|
|
878
|
+
readonly _dyn_core__ops__function__Fn__A_B_C___Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hb4a5dccdae894074: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
879
|
+
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8d2923cd4e648893: (a: number, b: number, c: number) => number;
|
|
880
|
+
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hf066437ba5ed1b74: (a: number, b: number, c: number) => void;
|
|
881
881
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
882
882
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
883
|
-
readonly
|
|
884
|
-
readonly
|
|
885
|
-
readonly
|
|
883
|
+
readonly wasm_bindgen__convert__closures__invoke0_mut__hf4bced6426ca6f31: (a: number, b: number) => void;
|
|
884
|
+
readonly wasm_bindgen__convert__closures__invoke3_mut__h425269a7185d1f5b: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
885
|
+
readonly wasm_bindgen__convert__closures__invoke2_mut__h1b9fff078715ef14: (a: number, b: number, c: number, d: number) => void;
|
|
886
886
|
readonly __wbindgen_start: () => void;
|
|
887
887
|
}
|
|
888
888
|
|
package/pkg/ridb_core.js
CHANGED
|
@@ -230,7 +230,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
230
230
|
return real;
|
|
231
231
|
}
|
|
232
232
|
function __wbg_adapter_56(arg0, arg1, arg2) {
|
|
233
|
-
wasm.
|
|
233
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h231d9c59fed64ed4(arg0, arg1, addHeapObject(arg2));
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
function makeClosure(arg0, arg1, dtor, f) {
|
|
@@ -257,7 +257,7 @@ function makeClosure(arg0, arg1, dtor, f) {
|
|
|
257
257
|
function __wbg_adapter_59(arg0, arg1, arg2, arg3, arg4) {
|
|
258
258
|
try {
|
|
259
259
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
260
|
-
wasm.
|
|
260
|
+
wasm._dyn_core__ops__function__Fn__A_B_C___Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hb4a5dccdae894074(retptr, arg0, arg1, addHeapObject(arg2), addHeapObject(arg3), addHeapObject(arg4));
|
|
261
261
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
262
262
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
263
263
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -271,12 +271,12 @@ function __wbg_adapter_59(arg0, arg1, arg2, arg3, arg4) {
|
|
|
271
271
|
}
|
|
272
272
|
|
|
273
273
|
function __wbg_adapter_62(arg0, arg1, arg2) {
|
|
274
|
-
const ret = wasm.
|
|
274
|
+
const ret = wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8d2923cd4e648893(arg0, arg1, addHeapObject(arg2));
|
|
275
275
|
return takeObject(ret);
|
|
276
276
|
}
|
|
277
277
|
|
|
278
|
-
function
|
|
279
|
-
wasm.
|
|
278
|
+
function __wbg_adapter_65(arg0, arg1, arg2) {
|
|
279
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hf066437ba5ed1b74(arg0, arg1, addHeapObject(arg2));
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
function _assertClass(instance, klass) {
|
|
@@ -313,24 +313,6 @@ function addBorrowedObject(obj) {
|
|
|
313
313
|
heap[--stack_pointer] = obj;
|
|
314
314
|
return stack_pointer;
|
|
315
315
|
}
|
|
316
|
-
|
|
317
|
-
function passArrayJsValueToWasm0(array, malloc) {
|
|
318
|
-
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
319
|
-
const mem = getUint32Memory0();
|
|
320
|
-
for (let i = 0; i < array.length; i++) {
|
|
321
|
-
mem[ptr / 4 + i] = addHeapObject(array[i]);
|
|
322
|
-
}
|
|
323
|
-
WASM_VECTOR_LEN = array.length;
|
|
324
|
-
return ptr;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
function handleError(f, args) {
|
|
328
|
-
try {
|
|
329
|
-
return f.apply(this, args);
|
|
330
|
-
} catch (e) {
|
|
331
|
-
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
316
|
/**
|
|
335
317
|
*/
|
|
336
318
|
export function main_js() {
|
|
@@ -345,6 +327,23 @@ export function is_debug_mode() {
|
|
|
345
327
|
return ret !== 0;
|
|
346
328
|
}
|
|
347
329
|
|
|
330
|
+
function handleError(f, args) {
|
|
331
|
+
try {
|
|
332
|
+
return f.apply(this, args);
|
|
333
|
+
} catch (e) {
|
|
334
|
+
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
339
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
340
|
+
const mem = getUint32Memory0();
|
|
341
|
+
for (let i = 0; i < array.length; i++) {
|
|
342
|
+
mem[ptr / 4 + i] = addHeapObject(array[i]);
|
|
343
|
+
}
|
|
344
|
+
WASM_VECTOR_LEN = array.length;
|
|
345
|
+
return ptr;
|
|
346
|
+
}
|
|
348
347
|
/**
|
|
349
348
|
* Handler for `console.log` invocations.
|
|
350
349
|
*
|
|
@@ -410,16 +409,16 @@ export function __wbgtest_console_error(args) {
|
|
|
410
409
|
}
|
|
411
410
|
}
|
|
412
411
|
|
|
413
|
-
function
|
|
414
|
-
wasm.
|
|
412
|
+
function __wbg_adapter_282(arg0, arg1) {
|
|
413
|
+
wasm.wasm_bindgen__convert__closures__invoke0_mut__hf4bced6426ca6f31(arg0, arg1);
|
|
415
414
|
}
|
|
416
415
|
|
|
417
|
-
function
|
|
418
|
-
wasm.
|
|
416
|
+
function __wbg_adapter_325(arg0, arg1, arg2, arg3, arg4) {
|
|
417
|
+
wasm.wasm_bindgen__convert__closures__invoke3_mut__h425269a7185d1f5b(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4));
|
|
419
418
|
}
|
|
420
419
|
|
|
421
|
-
function
|
|
422
|
-
wasm.
|
|
420
|
+
function __wbg_adapter_378(arg0, arg1, arg2, arg3) {
|
|
421
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__h1b9fff078715ef14(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
423
422
|
}
|
|
424
423
|
|
|
425
424
|
/**
|
|
@@ -2153,14 +2152,14 @@ function __wbg_get_imports() {
|
|
|
2153
2152
|
const ret = Database.__wrap(arg0);
|
|
2154
2153
|
return addHeapObject(ret);
|
|
2155
2154
|
};
|
|
2156
|
-
imports.wbg.__wbindgen_is_null = function(arg0) {
|
|
2157
|
-
const ret = getObject(arg0) === null;
|
|
2158
|
-
return ret;
|
|
2159
|
-
};
|
|
2160
2155
|
imports.wbg.__wbg_close_6384ed3c27ef25c1 = function() { return handleError(function (arg0) {
|
|
2161
2156
|
const ret = getObject(arg0).close();
|
|
2162
2157
|
return addHeapObject(ret);
|
|
2163
2158
|
}, arguments) };
|
|
2159
|
+
imports.wbg.__wbindgen_is_null = function(arg0) {
|
|
2160
|
+
const ret = getObject(arg0) === null;
|
|
2161
|
+
return ret;
|
|
2162
|
+
};
|
|
2164
2163
|
imports.wbg.__wbg_count_19db4c3174d573d5 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2165
2164
|
const ret = getObject(arg0).count(getStringFromWasm0(arg1, arg2), takeObject(arg3), QueryOptions.__wrap(arg4));
|
|
2166
2165
|
return addHeapObject(ret);
|
|
@@ -2196,13 +2195,8 @@ function __wbg_get_imports() {
|
|
|
2196
2195
|
const ret = false;
|
|
2197
2196
|
return ret;
|
|
2198
2197
|
};
|
|
2199
|
-
imports.wbg.
|
|
2200
|
-
const
|
|
2201
|
-
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
2202
|
-
return ret;
|
|
2203
|
-
};
|
|
2204
|
-
imports.wbg.__wbindgen_is_bigint = function(arg0) {
|
|
2205
|
-
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
2198
|
+
imports.wbg.__wbindgen_is_array = function(arg0) {
|
|
2199
|
+
const ret = Array.isArray(getObject(arg0));
|
|
2206
2200
|
return ret;
|
|
2207
2201
|
};
|
|
2208
2202
|
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
@@ -2210,44 +2204,49 @@ function __wbg_get_imports() {
|
|
|
2210
2204
|
const ret = typeof(val) === 'object' && val !== null;
|
|
2211
2205
|
return ret;
|
|
2212
2206
|
};
|
|
2213
|
-
imports.wbg.
|
|
2214
|
-
const ret = getObject(arg0)
|
|
2207
|
+
imports.wbg.__wbindgen_is_string = function(arg0) {
|
|
2208
|
+
const ret = typeof(getObject(arg0)) === 'string';
|
|
2215
2209
|
return ret;
|
|
2216
2210
|
};
|
|
2217
|
-
imports.wbg.
|
|
2218
|
-
const ret = arg0;
|
|
2219
|
-
return addHeapObject(ret);
|
|
2220
|
-
};
|
|
2221
|
-
imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
|
|
2222
|
-
const ret = getObject(arg0) === getObject(arg1);
|
|
2211
|
+
imports.wbg.__wbindgen_is_falsy = function(arg0) {
|
|
2212
|
+
const ret = !getObject(arg0);
|
|
2223
2213
|
return ret;
|
|
2224
2214
|
};
|
|
2225
|
-
imports.wbg.
|
|
2226
|
-
const ret =
|
|
2227
|
-
return
|
|
2215
|
+
imports.wbg.__wbindgen_is_function = function(arg0) {
|
|
2216
|
+
const ret = typeof(getObject(arg0)) === 'function';
|
|
2217
|
+
return ret;
|
|
2228
2218
|
};
|
|
2229
2219
|
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
2230
2220
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2231
2221
|
return addHeapObject(ret);
|
|
2232
2222
|
};
|
|
2233
|
-
imports.wbg.
|
|
2234
|
-
const ret =
|
|
2223
|
+
imports.wbg.__wbg_collection_new = function(arg0) {
|
|
2224
|
+
const ret = Collection.__wrap(arg0);
|
|
2225
|
+
return addHeapObject(ret);
|
|
2226
|
+
};
|
|
2227
|
+
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
2228
|
+
const v = getObject(arg0);
|
|
2229
|
+
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
2235
2230
|
return ret;
|
|
2236
2231
|
};
|
|
2237
|
-
imports.wbg.
|
|
2238
|
-
const ret =
|
|
2232
|
+
imports.wbg.__wbindgen_is_bigint = function(arg0) {
|
|
2233
|
+
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
2239
2234
|
return ret;
|
|
2240
2235
|
};
|
|
2241
|
-
imports.wbg.
|
|
2242
|
-
const ret =
|
|
2236
|
+
imports.wbg.__wbindgen_in = function(arg0, arg1) {
|
|
2237
|
+
const ret = getObject(arg0) in getObject(arg1);
|
|
2243
2238
|
return ret;
|
|
2244
2239
|
};
|
|
2245
|
-
imports.wbg.
|
|
2246
|
-
const ret =
|
|
2240
|
+
imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
|
|
2241
|
+
const ret = arg0;
|
|
2242
|
+
return addHeapObject(ret);
|
|
2243
|
+
};
|
|
2244
|
+
imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
|
|
2245
|
+
const ret = getObject(arg0) === getObject(arg1);
|
|
2247
2246
|
return ret;
|
|
2248
2247
|
};
|
|
2249
|
-
imports.wbg.
|
|
2250
|
-
const ret =
|
|
2248
|
+
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
2249
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
2251
2250
|
return addHeapObject(ret);
|
|
2252
2251
|
};
|
|
2253
2252
|
imports.wbg.__wbg_crypto_1d1f22824a6a080c = function(arg0) {
|
|
@@ -2298,14 +2297,23 @@ function __wbg_get_imports() {
|
|
|
2298
2297
|
const ret = getObject(arg0).indexedDB;
|
|
2299
2298
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2300
2299
|
}, arguments) };
|
|
2301
|
-
imports.wbg.
|
|
2302
|
-
|
|
2303
|
-
|
|
2300
|
+
imports.wbg.__wbg_instanceof_WorkerGlobalScope_46b577f151fad960 = function(arg0) {
|
|
2301
|
+
let result;
|
|
2302
|
+
try {
|
|
2303
|
+
result = getObject(arg0) instanceof WorkerGlobalScope;
|
|
2304
|
+
} catch (_) {
|
|
2305
|
+
result = false;
|
|
2306
|
+
}
|
|
2307
|
+
const ret = result;
|
|
2308
|
+
return ret;
|
|
2304
2309
|
};
|
|
2305
|
-
imports.wbg.
|
|
2306
|
-
const ret = getObject(arg0).
|
|
2307
|
-
return addHeapObject(ret);
|
|
2310
|
+
imports.wbg.__wbg_indexedDB_d312f95759a15fdc = function() { return handleError(function (arg0) {
|
|
2311
|
+
const ret = getObject(arg0).indexedDB;
|
|
2312
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2308
2313
|
}, arguments) };
|
|
2314
|
+
imports.wbg.__wbg_log_5bb5f88f245d7762 = function(arg0) {
|
|
2315
|
+
console.log(getObject(arg0));
|
|
2316
|
+
};
|
|
2309
2317
|
imports.wbg.__wbg_openCursor_425aba9cbe1d4d39 = function() { return handleError(function (arg0) {
|
|
2310
2318
|
const ret = getObject(arg0).openCursor();
|
|
2311
2319
|
return addHeapObject(ret);
|
|
@@ -2314,9 +2322,6 @@ function __wbg_get_imports() {
|
|
|
2314
2322
|
const ret = getObject(arg0).openCursor(getObject(arg1));
|
|
2315
2323
|
return addHeapObject(ret);
|
|
2316
2324
|
}, arguments) };
|
|
2317
|
-
imports.wbg.__wbg_log_5bb5f88f245d7762 = function(arg0) {
|
|
2318
|
-
console.log(getObject(arg0));
|
|
2319
|
-
};
|
|
2320
2325
|
imports.wbg.__wbg_createIndex_b8da1f5571f644be = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
2321
2326
|
const ret = getObject(arg0).createIndex(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), getObject(arg5));
|
|
2322
2327
|
return addHeapObject(ret);
|
|
@@ -2345,6 +2350,10 @@ function __wbg_get_imports() {
|
|
|
2345
2350
|
const ret = getObject(arg0).put(getObject(arg1), getObject(arg2));
|
|
2346
2351
|
return addHeapObject(ret);
|
|
2347
2352
|
}, arguments) };
|
|
2353
|
+
imports.wbg.__wbg_target_2fc177e386c8b7b0 = function(arg0) {
|
|
2354
|
+
const ret = getObject(arg0).target;
|
|
2355
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2356
|
+
};
|
|
2348
2357
|
imports.wbg.__wbg_instanceof_IdbDatabase_db671cf2454a9542 = function(arg0) {
|
|
2349
2358
|
let result;
|
|
2350
2359
|
try {
|
|
@@ -2374,19 +2383,6 @@ function __wbg_get_imports() {
|
|
|
2374
2383
|
const ret = getObject(arg0).transaction(getStringFromWasm0(arg1, arg2), takeObject(arg3));
|
|
2375
2384
|
return addHeapObject(ret);
|
|
2376
2385
|
}, arguments) };
|
|
2377
|
-
imports.wbg.__wbg_instanceof_IdbOpenDbRequest_3f4a166bc0340578 = function(arg0) {
|
|
2378
|
-
let result;
|
|
2379
|
-
try {
|
|
2380
|
-
result = getObject(arg0) instanceof IDBOpenDBRequest;
|
|
2381
|
-
} catch (_) {
|
|
2382
|
-
result = false;
|
|
2383
|
-
}
|
|
2384
|
-
const ret = result;
|
|
2385
|
-
return ret;
|
|
2386
|
-
};
|
|
2387
|
-
imports.wbg.__wbg_setonupgradeneeded_ad7645373c7d5e1b = function(arg0, arg1) {
|
|
2388
|
-
getObject(arg0).onupgradeneeded = getObject(arg1);
|
|
2389
|
-
};
|
|
2390
2386
|
imports.wbg.__wbg_length_9ae5daf9a690cba9 = function(arg0) {
|
|
2391
2387
|
const ret = getObject(arg0).length;
|
|
2392
2388
|
return ret;
|
|
@@ -2416,13 +2412,6 @@ function __wbg_get_imports() {
|
|
|
2416
2412
|
const ret = getObject(arg0).value;
|
|
2417
2413
|
return addHeapObject(ret);
|
|
2418
2414
|
}, arguments) };
|
|
2419
|
-
imports.wbg.__wbg_only_cacf767244bdc280 = function() { return handleError(function (arg0) {
|
|
2420
|
-
const ret = IDBKeyRange.only(getObject(arg0));
|
|
2421
|
-
return addHeapObject(ret);
|
|
2422
|
-
}, arguments) };
|
|
2423
|
-
imports.wbg.__wbg_continue_f1c3e0815924de62 = function() { return handleError(function (arg0) {
|
|
2424
|
-
getObject(arg0).continue();
|
|
2425
|
-
}, arguments) };
|
|
2426
2415
|
imports.wbg.__wbg_getItem_164e8e5265095b87 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
2427
2416
|
const ret = getObject(arg1).getItem(getStringFromWasm0(arg2, arg3));
|
|
2428
2417
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -2430,6 +2419,23 @@ function __wbg_get_imports() {
|
|
|
2430
2419
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
2431
2420
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
2432
2421
|
}, arguments) };
|
|
2422
|
+
imports.wbg.__wbg_open_f0d7259fd7e689ce = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
2423
|
+
const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2), arg3 >>> 0);
|
|
2424
|
+
return addHeapObject(ret);
|
|
2425
|
+
}, arguments) };
|
|
2426
|
+
imports.wbg.__wbg_instanceof_IdbOpenDbRequest_3f4a166bc0340578 = function(arg0) {
|
|
2427
|
+
let result;
|
|
2428
|
+
try {
|
|
2429
|
+
result = getObject(arg0) instanceof IDBOpenDBRequest;
|
|
2430
|
+
} catch (_) {
|
|
2431
|
+
result = false;
|
|
2432
|
+
}
|
|
2433
|
+
const ret = result;
|
|
2434
|
+
return ret;
|
|
2435
|
+
};
|
|
2436
|
+
imports.wbg.__wbg_setonupgradeneeded_ad7645373c7d5e1b = function(arg0, arg1) {
|
|
2437
|
+
getObject(arg0).onupgradeneeded = getObject(arg1);
|
|
2438
|
+
};
|
|
2433
2439
|
imports.wbg.__wbg_instanceof_IdbRequest_93249da04f5370b6 = function(arg0) {
|
|
2434
2440
|
let result;
|
|
2435
2441
|
try {
|
|
@@ -2464,6 +2470,13 @@ function __wbg_get_imports() {
|
|
|
2464
2470
|
const ret = getObject(arg0).objectStore(getStringFromWasm0(arg1, arg2));
|
|
2465
2471
|
return addHeapObject(ret);
|
|
2466
2472
|
}, arguments) };
|
|
2473
|
+
imports.wbg.__wbg_continue_f1c3e0815924de62 = function() { return handleError(function (arg0) {
|
|
2474
|
+
getObject(arg0).continue();
|
|
2475
|
+
}, arguments) };
|
|
2476
|
+
imports.wbg.__wbg_only_cacf767244bdc280 = function() { return handleError(function (arg0) {
|
|
2477
|
+
const ret = IDBKeyRange.only(getObject(arg0));
|
|
2478
|
+
return addHeapObject(ret);
|
|
2479
|
+
}, arguments) };
|
|
2467
2480
|
imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
2468
2481
|
const ret = getObject(arg0) == getObject(arg1);
|
|
2469
2482
|
return ret;
|
|
@@ -2510,7 +2523,7 @@ function __wbg_get_imports() {
|
|
|
2510
2523
|
const a = state0.a;
|
|
2511
2524
|
state0.a = 0;
|
|
2512
2525
|
try {
|
|
2513
|
-
return
|
|
2526
|
+
return __wbg_adapter_282(a, state0.b, );
|
|
2514
2527
|
} finally {
|
|
2515
2528
|
state0.a = a;
|
|
2516
2529
|
}
|
|
@@ -2520,13 +2533,6 @@ function __wbg_get_imports() {
|
|
|
2520
2533
|
state0.a = state0.b = 0;
|
|
2521
2534
|
}
|
|
2522
2535
|
}, arguments) };
|
|
2523
|
-
imports.wbg.__wbg_wbgtestoutputwriteln_4db3bd64914ec955 = function(arg0) {
|
|
2524
|
-
__wbg_test_output_writeln(takeObject(arg0));
|
|
2525
|
-
};
|
|
2526
|
-
imports.wbg.__wbg_stack_436273c21658169b = function(arg0) {
|
|
2527
|
-
const ret = getObject(arg0).stack;
|
|
2528
|
-
return addHeapObject(ret);
|
|
2529
|
-
};
|
|
2530
2536
|
imports.wbg.__wbg_static_accessor_document_d4b6ae7f5578480f = function() {
|
|
2531
2537
|
const ret = document;
|
|
2532
2538
|
return addHeapObject(ret);
|
|
@@ -2564,6 +2570,13 @@ function __wbg_get_imports() {
|
|
|
2564
2570
|
const ret = getObject(arg0).stack;
|
|
2565
2571
|
return addHeapObject(ret);
|
|
2566
2572
|
};
|
|
2573
|
+
imports.wbg.__wbg_wbgtestoutputwriteln_4db3bd64914ec955 = function(arg0) {
|
|
2574
|
+
__wbg_test_output_writeln(takeObject(arg0));
|
|
2575
|
+
};
|
|
2576
|
+
imports.wbg.__wbg_stack_436273c21658169b = function(arg0) {
|
|
2577
|
+
const ret = getObject(arg0).stack;
|
|
2578
|
+
return addHeapObject(ret);
|
|
2579
|
+
};
|
|
2567
2580
|
imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
|
|
2568
2581
|
const ret = new Error();
|
|
2569
2582
|
return addHeapObject(ret);
|
|
@@ -2586,13 +2599,13 @@ function __wbg_get_imports() {
|
|
|
2586
2599
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2587
2600
|
}
|
|
2588
2601
|
};
|
|
2602
|
+
imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4 = function(arg0) {
|
|
2603
|
+
queueMicrotask(getObject(arg0));
|
|
2604
|
+
};
|
|
2589
2605
|
imports.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6 = function(arg0) {
|
|
2590
2606
|
const ret = getObject(arg0).queueMicrotask;
|
|
2591
2607
|
return addHeapObject(ret);
|
|
2592
2608
|
};
|
|
2593
|
-
imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4 = function(arg0) {
|
|
2594
|
-
queueMicrotask(getObject(arg0));
|
|
2595
|
-
};
|
|
2596
2609
|
imports.wbg.__wbg_get_bd8e338fbd5f5cc8 = function(arg0, arg1) {
|
|
2597
2610
|
const ret = getObject(arg0)[arg1 >>> 0];
|
|
2598
2611
|
return addHeapObject(ret);
|
|
@@ -2675,7 +2688,7 @@ function __wbg_get_imports() {
|
|
|
2675
2688
|
const a = state0.a;
|
|
2676
2689
|
state0.a = 0;
|
|
2677
2690
|
try {
|
|
2678
|
-
return
|
|
2691
|
+
return __wbg_adapter_325(a, state0.b, arg0, arg1, arg2);
|
|
2679
2692
|
} finally {
|
|
2680
2693
|
state0.a = a;
|
|
2681
2694
|
}
|
|
@@ -2758,7 +2771,7 @@ function __wbg_get_imports() {
|
|
|
2758
2771
|
const a = state0.a;
|
|
2759
2772
|
state0.a = 0;
|
|
2760
2773
|
try {
|
|
2761
|
-
return
|
|
2774
|
+
return __wbg_adapter_378(a, state0.b, arg0, arg1);
|
|
2762
2775
|
} finally {
|
|
2763
2776
|
state0.a = a;
|
|
2764
2777
|
}
|
|
@@ -2858,24 +2871,20 @@ function __wbg_get_imports() {
|
|
|
2858
2871
|
const ret = wasm.memory;
|
|
2859
2872
|
return addHeapObject(ret);
|
|
2860
2873
|
};
|
|
2861
|
-
imports.wbg.
|
|
2862
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2863
|
-
return addHeapObject(ret);
|
|
2864
|
-
};
|
|
2865
|
-
imports.wbg.__wbindgen_closure_wrapper961 = function(arg0, arg1, arg2) {
|
|
2866
|
-
const ret = makeClosure(arg0, arg1, 354, __wbg_adapter_59);
|
|
2874
|
+
imports.wbg.__wbindgen_closure_wrapper483 = function(arg0, arg1, arg2) {
|
|
2875
|
+
const ret = makeMutClosure(arg0, arg1, 170, __wbg_adapter_56);
|
|
2867
2876
|
return addHeapObject(ret);
|
|
2868
2877
|
};
|
|
2869
|
-
imports.wbg.
|
|
2870
|
-
const ret =
|
|
2878
|
+
imports.wbg.__wbindgen_closure_wrapper485 = function(arg0, arg1, arg2) {
|
|
2879
|
+
const ret = makeClosure(arg0, arg1, 170, __wbg_adapter_59);
|
|
2871
2880
|
return addHeapObject(ret);
|
|
2872
2881
|
};
|
|
2873
|
-
imports.wbg.
|
|
2874
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2882
|
+
imports.wbg.__wbindgen_closure_wrapper487 = function(arg0, arg1, arg2) {
|
|
2883
|
+
const ret = makeMutClosure(arg0, arg1, 170, __wbg_adapter_62);
|
|
2875
2884
|
return addHeapObject(ret);
|
|
2876
2885
|
};
|
|
2877
|
-
imports.wbg.
|
|
2878
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2886
|
+
imports.wbg.__wbindgen_closure_wrapper1580 = function(arg0, arg1, arg2) {
|
|
2887
|
+
const ret = makeMutClosure(arg0, arg1, 432, __wbg_adapter_65);
|
|
2879
2888
|
return addHeapObject(ret);
|
|
2880
2889
|
};
|
|
2881
2890
|
|
package/pkg/ridb_core_bg.wasm
CHANGED
|
Binary file
|