@trust0/ridb-core 1.5.5 → 1.5.6
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 +1 -1
- package/pkg/ridb_core.d.ts +60 -60
- package/pkg/ridb_core.js +34 -30
- package/pkg/ridb_core_bg.wasm +0 -0
package/package.json
CHANGED
package/pkg/ridb_core.d.ts
CHANGED
|
@@ -38,6 +38,16 @@ export function __wbgtest_console_warn(args: Array<any>): void;
|
|
|
38
38
|
*/
|
|
39
39
|
export function __wbgtest_console_error(args: Array<any>): void;
|
|
40
40
|
/**
|
|
41
|
+
*/
|
|
42
|
+
export enum Errors {
|
|
43
|
+
Error = 0,
|
|
44
|
+
HookError = 1,
|
|
45
|
+
QueryError = 2,
|
|
46
|
+
SerializationError = 3,
|
|
47
|
+
ValidationError = 4,
|
|
48
|
+
AuthenticationError = 5,
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
41
51
|
* Represents the type of operation to be performed on the collection.
|
|
42
52
|
*/
|
|
43
53
|
export enum OpType {
|
|
@@ -62,52 +72,6 @@ export enum OpType {
|
|
|
62
72
|
*/
|
|
63
73
|
COUNT = 4,
|
|
64
74
|
}
|
|
65
|
-
/**
|
|
66
|
-
*/
|
|
67
|
-
export enum Errors {
|
|
68
|
-
Error = 0,
|
|
69
|
-
HookError = 1,
|
|
70
|
-
QueryError = 2,
|
|
71
|
-
SerializationError = 3,
|
|
72
|
-
ValidationError = 4,
|
|
73
|
-
AuthenticationError = 5,
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export type Operators<T> = {
|
|
77
|
-
$gte?: number,
|
|
78
|
-
$gt?: number
|
|
79
|
-
$lt?: number,
|
|
80
|
-
$lte?: number,
|
|
81
|
-
$eq?: T,
|
|
82
|
-
$ne?: T
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
export type InOperator<T> = { $in?: T[] };
|
|
86
|
-
export type NInOperator<T> = { $nin?: T[] };
|
|
87
|
-
|
|
88
|
-
export type OperatorOrType<T> = T extends number ?
|
|
89
|
-
T | Operators<T> | InOperator<T> | NInOperator<T> :
|
|
90
|
-
T | InOperator<T> | NInOperator<T>;
|
|
91
|
-
|
|
92
|
-
export type LogicalOperators<T extends SchemaType> = {
|
|
93
|
-
$and?: Partial<QueryType<T>>[];
|
|
94
|
-
$or?: Partial<QueryType<T>>[];
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
export type QueryType<T extends SchemaType> = Partial<{
|
|
98
|
-
[K in keyof T['properties']]: OperatorOrType<
|
|
99
|
-
ExtractType<
|
|
100
|
-
T['properties'][K]['type']
|
|
101
|
-
>
|
|
102
|
-
>
|
|
103
|
-
}> & LogicalOperators<T> | LogicalOperators<T>[];
|
|
104
|
-
|
|
105
|
-
export class Query<T extends SchemaType> {
|
|
106
|
-
constructor(query: QueryType<T>, schema:Schema<T>);
|
|
107
|
-
readonly query: QueryType<T>;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
|
|
111
75
|
|
|
112
76
|
export class CoreStorage {
|
|
113
77
|
/**
|
|
@@ -149,6 +113,42 @@ export type Operation<T extends SchemaType = SchemaType> = {
|
|
|
149
113
|
|
|
150
114
|
|
|
151
115
|
|
|
116
|
+
export type Operators<T> = {
|
|
117
|
+
$gte?: number,
|
|
118
|
+
$gt?: number
|
|
119
|
+
$lt?: number,
|
|
120
|
+
$lte?: number,
|
|
121
|
+
$eq?: T,
|
|
122
|
+
$ne?: T
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
export type InOperator<T> = { $in?: T[] };
|
|
126
|
+
export type NInOperator<T> = { $nin?: T[] };
|
|
127
|
+
|
|
128
|
+
export type OperatorOrType<T> = T extends number ?
|
|
129
|
+
T | Operators<T> | InOperator<T> | NInOperator<T> :
|
|
130
|
+
T | InOperator<T> | NInOperator<T>;
|
|
131
|
+
|
|
132
|
+
export type LogicalOperators<T extends SchemaType> = {
|
|
133
|
+
$and?: Partial<QueryType<T>>[];
|
|
134
|
+
$or?: Partial<QueryType<T>>[];
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
export type QueryType<T extends SchemaType> = Partial<{
|
|
138
|
+
[K in keyof T['properties']]: OperatorOrType<
|
|
139
|
+
ExtractType<
|
|
140
|
+
T['properties'][K]['type']
|
|
141
|
+
>
|
|
142
|
+
>
|
|
143
|
+
}> & LogicalOperators<T> | LogicalOperators<T>[];
|
|
144
|
+
|
|
145
|
+
export class Query<T extends SchemaType> {
|
|
146
|
+
constructor(query: QueryType<T>, schema:Schema<T>);
|
|
147
|
+
readonly query: QueryType<T>;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
152
|
export type BaseStorageOptions = {
|
|
153
153
|
[name:string]:string | boolean | number
|
|
154
154
|
}
|
|
@@ -817,6 +817,20 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
817
817
|
|
|
818
818
|
export interface InitOutput {
|
|
819
819
|
readonly memory: WebAssembly.Memory;
|
|
820
|
+
readonly corestorage_new: () => number;
|
|
821
|
+
readonly corestorage_getPrimaryKeyTyped: (a: number, b: number, c: number) => void;
|
|
822
|
+
readonly corestorage_getIndexes: (a: number, b: number, c: number, d: number) => void;
|
|
823
|
+
readonly corestorage_matchesQuery: (a: number, b: number, c: number, d: number) => void;
|
|
824
|
+
readonly __wbg_operation_free: (a: number) => void;
|
|
825
|
+
readonly operation_collection: (a: number, b: number) => void;
|
|
826
|
+
readonly operation_opType: (a: number) => number;
|
|
827
|
+
readonly operation_data: (a: number) => number;
|
|
828
|
+
readonly operation_primaryKeyField: (a: number) => number;
|
|
829
|
+
readonly operation_primaryKey: (a: number) => number;
|
|
830
|
+
readonly operation_primaryKeyIndex: (a: number, b: number) => void;
|
|
831
|
+
readonly main_js: () => void;
|
|
832
|
+
readonly is_debug_mode: () => number;
|
|
833
|
+
readonly __wbg_corestorage_free: (a: number) => void;
|
|
820
834
|
readonly __wbg_query_free: (a: number) => void;
|
|
821
835
|
readonly query_new: (a: number, b: number, c: number) => void;
|
|
822
836
|
readonly query_query: (a: number, b: number) => void;
|
|
@@ -853,20 +867,6 @@ export interface InitOutput {
|
|
|
853
867
|
readonly __wbgt_test_query_parse_eq_operator_wrong_type_32: (a: number) => void;
|
|
854
868
|
readonly __wbgt_test_query_parse_ne_operator_33: (a: number) => void;
|
|
855
869
|
readonly __wbgt_test_query_parse_ne_operator_wrong_type_34: (a: number) => void;
|
|
856
|
-
readonly corestorage_new: () => number;
|
|
857
|
-
readonly corestorage_getPrimaryKeyTyped: (a: number, b: number, c: number) => void;
|
|
858
|
-
readonly corestorage_getIndexes: (a: number, b: number, c: number, d: number) => void;
|
|
859
|
-
readonly corestorage_matchesQuery: (a: number, b: number, c: number, d: number) => void;
|
|
860
|
-
readonly __wbg_operation_free: (a: number) => void;
|
|
861
|
-
readonly operation_collection: (a: number, b: number) => void;
|
|
862
|
-
readonly operation_opType: (a: number) => number;
|
|
863
|
-
readonly operation_data: (a: number) => number;
|
|
864
|
-
readonly operation_primaryKeyField: (a: number) => number;
|
|
865
|
-
readonly operation_primaryKey: (a: number) => number;
|
|
866
|
-
readonly operation_primaryKeyIndex: (a: number, b: number) => void;
|
|
867
|
-
readonly main_js: () => void;
|
|
868
|
-
readonly is_debug_mode: () => number;
|
|
869
|
-
readonly __wbg_corestorage_free: (a: number) => void;
|
|
870
870
|
readonly __wbg_basestorage_free: (a: number) => void;
|
|
871
871
|
readonly basestorage_new: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
872
872
|
readonly basestorage_addIndexSchemas: (a: number, b: number) => void;
|
package/pkg/ridb_core.js
CHANGED
|
@@ -421,6 +421,9 @@ function __wbg_adapter_390(arg0, arg1, arg2, arg3) {
|
|
|
421
421
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h1b9fff078715ef14(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
422
422
|
}
|
|
423
423
|
|
|
424
|
+
/**
|
|
425
|
+
*/
|
|
426
|
+
export const Errors = Object.freeze({ Error:0,"0":"Error",HookError:1,"1":"HookError",QueryError:2,"2":"QueryError",SerializationError:3,"3":"SerializationError",ValidationError:4,"4":"ValidationError",AuthenticationError:5,"5":"AuthenticationError", });
|
|
424
427
|
/**
|
|
425
428
|
* Represents the type of operation to be performed on the collection.
|
|
426
429
|
*/
|
|
@@ -445,9 +448,6 @@ QUERY:3,"3":"QUERY",
|
|
|
445
448
|
* Count Operation.
|
|
446
449
|
*/
|
|
447
450
|
COUNT:4,"4":"COUNT", });
|
|
448
|
-
/**
|
|
449
|
-
*/
|
|
450
|
-
export const Errors = Object.freeze({ Error:0,"0":"Error",HookError:1,"1":"HookError",QueryError:2,"2":"QueryError",SerializationError:3,"3":"SerializationError",ValidationError:4,"4":"ValidationError",AuthenticationError:5,"5":"AuthenticationError", });
|
|
451
451
|
|
|
452
452
|
const BasePluginFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
453
453
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1087,7 +1087,8 @@ export class InMemory {
|
|
|
1087
1087
|
const ptr0 = passStringToWasm0(collection_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1088
1088
|
const len0 = WASM_VECTOR_LEN;
|
|
1089
1089
|
_assertClass(options, QueryOptions);
|
|
1090
|
-
|
|
1090
|
+
var ptr1 = options.__destroy_into_raw();
|
|
1091
|
+
const ret = wasm.inmemory_find(this.__wbg_ptr, ptr0, len0, addHeapObject(query_js), ptr1);
|
|
1091
1092
|
return takeObject(ret);
|
|
1092
1093
|
}
|
|
1093
1094
|
/**
|
|
@@ -1111,7 +1112,8 @@ export class InMemory {
|
|
|
1111
1112
|
const ptr0 = passStringToWasm0(collection_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1112
1113
|
const len0 = WASM_VECTOR_LEN;
|
|
1113
1114
|
_assertClass(options, QueryOptions);
|
|
1114
|
-
|
|
1115
|
+
var ptr1 = options.__destroy_into_raw();
|
|
1116
|
+
const ret = wasm.inmemory_count(this.__wbg_ptr, ptr0, len0, addHeapObject(query_js), ptr1);
|
|
1115
1117
|
return takeObject(ret);
|
|
1116
1118
|
}
|
|
1117
1119
|
/**
|
|
@@ -1223,7 +1225,8 @@ export class IndexDB {
|
|
|
1223
1225
|
const ptr0 = passStringToWasm0(collection_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1224
1226
|
const len0 = WASM_VECTOR_LEN;
|
|
1225
1227
|
_assertClass(options, QueryOptions);
|
|
1226
|
-
|
|
1228
|
+
var ptr1 = options.__destroy_into_raw();
|
|
1229
|
+
const ret = wasm.indexdb_find(this.__wbg_ptr, ptr0, len0, addHeapObject(query), ptr1);
|
|
1227
1230
|
return takeObject(ret);
|
|
1228
1231
|
}
|
|
1229
1232
|
/**
|
|
@@ -1247,7 +1250,8 @@ export class IndexDB {
|
|
|
1247
1250
|
const ptr0 = passStringToWasm0(collection_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1248
1251
|
const len0 = WASM_VECTOR_LEN;
|
|
1249
1252
|
_assertClass(options, QueryOptions);
|
|
1250
|
-
|
|
1253
|
+
var ptr1 = options.__destroy_into_raw();
|
|
1254
|
+
const ret = wasm.indexdb_count(this.__wbg_ptr, ptr0, len0, addHeapObject(query), ptr1);
|
|
1251
1255
|
return takeObject(ret);
|
|
1252
1256
|
}
|
|
1253
1257
|
/**
|
|
@@ -2377,9 +2381,17 @@ function __wbg_get_imports() {
|
|
|
2377
2381
|
const ret = false;
|
|
2378
2382
|
return ret;
|
|
2379
2383
|
};
|
|
2380
|
-
imports.wbg.
|
|
2381
|
-
const ret =
|
|
2382
|
-
return ret;
|
|
2384
|
+
imports.wbg.__wbg_indexdb_new = function(arg0) {
|
|
2385
|
+
const ret = IndexDB.__wrap(arg0);
|
|
2386
|
+
return addHeapObject(ret);
|
|
2387
|
+
};
|
|
2388
|
+
imports.wbg.__wbg_collection_new = function(arg0) {
|
|
2389
|
+
const ret = Collection.__wrap(arg0);
|
|
2390
|
+
return addHeapObject(ret);
|
|
2391
|
+
};
|
|
2392
|
+
imports.wbg.__wbg_database_new = function(arg0) {
|
|
2393
|
+
const ret = Database.__wrap(arg0);
|
|
2394
|
+
return addHeapObject(ret);
|
|
2383
2395
|
};
|
|
2384
2396
|
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
2385
2397
|
const val = getObject(arg0);
|
|
@@ -2394,23 +2406,15 @@ function __wbg_get_imports() {
|
|
|
2394
2406
|
const ret = !getObject(arg0);
|
|
2395
2407
|
return ret;
|
|
2396
2408
|
};
|
|
2397
|
-
imports.wbg.__wbg_collection_new = function(arg0) {
|
|
2398
|
-
const ret = Collection.__wrap(arg0);
|
|
2399
|
-
return addHeapObject(ret);
|
|
2400
|
-
};
|
|
2401
|
-
imports.wbg.__wbg_database_new = function(arg0) {
|
|
2402
|
-
const ret = Database.__wrap(arg0);
|
|
2403
|
-
return addHeapObject(ret);
|
|
2404
|
-
};
|
|
2405
|
-
imports.wbg.__wbg_indexdb_new = function(arg0) {
|
|
2406
|
-
const ret = IndexDB.__wrap(arg0);
|
|
2407
|
-
return addHeapObject(ret);
|
|
2408
|
-
};
|
|
2409
2409
|
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
2410
2410
|
const v = getObject(arg0);
|
|
2411
2411
|
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
2412
2412
|
return ret;
|
|
2413
2413
|
};
|
|
2414
|
+
imports.wbg.__wbindgen_is_array = function(arg0) {
|
|
2415
|
+
const ret = Array.isArray(getObject(arg0));
|
|
2416
|
+
return ret;
|
|
2417
|
+
};
|
|
2414
2418
|
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
2415
2419
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2416
2420
|
return addHeapObject(ret);
|
|
@@ -3057,20 +3061,20 @@ function __wbg_get_imports() {
|
|
|
3057
3061
|
const ret = wasm.memory;
|
|
3058
3062
|
return addHeapObject(ret);
|
|
3059
3063
|
};
|
|
3060
|
-
imports.wbg.
|
|
3061
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3064
|
+
imports.wbg.__wbindgen_closure_wrapper403 = function(arg0, arg1, arg2) {
|
|
3065
|
+
const ret = makeMutClosure(arg0, arg1, 172, __wbg_adapter_56);
|
|
3062
3066
|
return addHeapObject(ret);
|
|
3063
3067
|
};
|
|
3064
|
-
imports.wbg.
|
|
3065
|
-
const ret = makeClosure(arg0, arg1,
|
|
3068
|
+
imports.wbg.__wbindgen_closure_wrapper405 = function(arg0, arg1, arg2) {
|
|
3069
|
+
const ret = makeClosure(arg0, arg1, 172, __wbg_adapter_59);
|
|
3066
3070
|
return addHeapObject(ret);
|
|
3067
3071
|
};
|
|
3068
|
-
imports.wbg.
|
|
3069
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3072
|
+
imports.wbg.__wbindgen_closure_wrapper407 = function(arg0, arg1, arg2) {
|
|
3073
|
+
const ret = makeMutClosure(arg0, arg1, 172, __wbg_adapter_62);
|
|
3070
3074
|
return addHeapObject(ret);
|
|
3071
3075
|
};
|
|
3072
|
-
imports.wbg.
|
|
3073
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3076
|
+
imports.wbg.__wbindgen_closure_wrapper1623 = function(arg0, arg1, arg2) {
|
|
3077
|
+
const ret = makeMutClosure(arg0, arg1, 452, __wbg_adapter_65);
|
|
3074
3078
|
return addHeapObject(ret);
|
|
3075
3079
|
};
|
|
3076
3080
|
|
package/pkg/ridb_core_bg.wasm
CHANGED
|
Binary file
|