bun-sqlite-for-rxdb 1.3.1 → 1.4.0
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/dist/index.js +349 -115
- package/dist/src/instance.d.ts +0 -1
- package/dist/src/query/builder.d.ts +1 -0
- package/dist/src/query/lightweight-matcher.d.ts +3 -0
- package/dist/src/query/operators.d.ts +11 -11
- package/dist/src/query/schema-mapper.d.ts +1 -1
- package/package.json +5 -3
- package/CHANGELOG.md +0 -722
package/dist/src/instance.d.ts
CHANGED
|
@@ -18,7 +18,6 @@ export declare class BunSQLiteStorageInstance<RxDocType> implements RxStorageIns
|
|
|
18
18
|
bulkWrite(documentWrites: BulkWriteRow<RxDocType>[], context: string): Promise<RxStorageBulkWriteResponse<RxDocType>>;
|
|
19
19
|
findDocumentsById(ids: string[], withDeleted: boolean): Promise<RxDocumentData<RxDocType>[]>;
|
|
20
20
|
query(preparedQuery: PreparedQuery<RxDocType>): Promise<RxStorageQueryResult<RxDocType>>;
|
|
21
|
-
private matchesSelector;
|
|
22
21
|
private sortDocuments;
|
|
23
22
|
private getNestedValue;
|
|
24
23
|
count(preparedQuery: PreparedQuery<RxDocType>): Promise<RxStorageCountResult>;
|
|
@@ -3,4 +3,5 @@ import type { SqlFragment } from './operators';
|
|
|
3
3
|
export declare function getCacheSize(): number;
|
|
4
4
|
export declare function clearCache(): void;
|
|
5
5
|
export declare function buildWhereClause<RxDocType>(selector: MangoQuerySelector<RxDocumentData<RxDocType>>, schema: RxJsonSchema<RxDocumentData<RxDocType>>, collectionName: string): SqlFragment | null;
|
|
6
|
+
export declare function buildLogicalOperator<RxDocType>(operator: 'or' | 'nor' | 'and', conditions: MangoQuerySelector<RxDocumentData<RxDocType>>[], schema: RxJsonSchema<RxDocumentData<RxDocType>>, logicalDepth: number): SqlFragment | null;
|
|
6
7
|
//# sourceMappingURL=builder.d.ts.map
|
|
@@ -8,19 +8,19 @@ type OperatorExpression = {
|
|
|
8
8
|
[key: string]: unknown;
|
|
9
9
|
};
|
|
10
10
|
export type ElemMatchCriteria = QueryValue | OperatorExpression;
|
|
11
|
-
export declare function translateEq(field: string, value: unknown): SqlFragment;
|
|
12
|
-
export declare function translateNe(field: string, value: unknown): SqlFragment;
|
|
13
|
-
export declare function translateGt(field: string, value: unknown): SqlFragment;
|
|
14
|
-
export declare function translateGte(field: string, value: unknown): SqlFragment;
|
|
15
|
-
export declare function translateLt(field: string, value: unknown): SqlFragment;
|
|
16
|
-
export declare function translateLte(field: string, value: unknown): SqlFragment;
|
|
17
|
-
export declare function translateIn(field: string, values: unknown[]): SqlFragment;
|
|
18
|
-
export declare function translateNin(field: string, values: unknown[]): SqlFragment;
|
|
11
|
+
export declare function translateEq<RxDocType>(field: string, value: unknown, schema?: RxJsonSchema<RxDocumentData<RxDocType>>, actualFieldName?: string): SqlFragment;
|
|
12
|
+
export declare function translateNe<RxDocType>(field: string, value: unknown, schema?: RxJsonSchema<RxDocumentData<RxDocType>>, actualFieldName?: string): SqlFragment;
|
|
13
|
+
export declare function translateGt<RxDocType>(field: string, value: unknown, schema?: RxJsonSchema<RxDocumentData<RxDocType>>, actualFieldName?: string): SqlFragment;
|
|
14
|
+
export declare function translateGte<RxDocType>(field: string, value: unknown, schema?: RxJsonSchema<RxDocumentData<RxDocType>>, actualFieldName?: string): SqlFragment;
|
|
15
|
+
export declare function translateLt<RxDocType>(field: string, value: unknown, schema?: RxJsonSchema<RxDocumentData<RxDocType>>, actualFieldName?: string): SqlFragment;
|
|
16
|
+
export declare function translateLte<RxDocType>(field: string, value: unknown, schema?: RxJsonSchema<RxDocumentData<RxDocType>>, actualFieldName?: string): SqlFragment;
|
|
17
|
+
export declare function translateIn<RxDocType>(field: string, values: unknown[], schema?: RxJsonSchema<RxDocumentData<RxDocType>>, actualFieldName?: string): SqlFragment;
|
|
18
|
+
export declare function translateNin<RxDocType>(field: string, values: unknown[], schema?: RxJsonSchema<RxDocumentData<RxDocType>>, actualFieldName?: string): SqlFragment;
|
|
19
19
|
export declare function translateExists(field: string, exists: boolean): SqlFragment;
|
|
20
20
|
export declare function translateRegex<RxDocType>(field: string, pattern: string, options: string | undefined, schema: RxJsonSchema<RxDocumentData<RxDocType>>, fieldName: string): SqlFragment | null;
|
|
21
|
-
export declare function translateElemMatch(field: string, criteria: ElemMatchCriteria): SqlFragment | null;
|
|
22
|
-
export declare function translateNot(field: string, criteria: unknown): SqlFragment | null;
|
|
23
|
-
export declare function translateType(jsonColumn: string, fieldName: string, type: string): SqlFragment | null;
|
|
21
|
+
export declare function translateElemMatch<RxDocType>(field: string, criteria: ElemMatchCriteria, schema: RxJsonSchema<RxDocumentData<RxDocType>>, actualFieldName: string): SqlFragment | null;
|
|
22
|
+
export declare function translateNot<RxDocType>(field: string, criteria: unknown, schema: RxJsonSchema<RxDocumentData<RxDocType>>, actualFieldName: string): SqlFragment | null;
|
|
23
|
+
export declare function translateType(jsonColumn: string, fieldName: string, type: string, isDirectPath?: boolean): SqlFragment | null;
|
|
24
24
|
export declare function translateSize(field: string, size: number): SqlFragment;
|
|
25
25
|
export declare function translateMod(field: string, value: unknown): SqlFragment | null;
|
|
26
26
|
export {};
|
|
@@ -2,7 +2,7 @@ import type { RxJsonSchema, RxDocumentData } from 'rxdb';
|
|
|
2
2
|
export interface ColumnInfo {
|
|
3
3
|
column?: string;
|
|
4
4
|
jsonPath?: string;
|
|
5
|
-
type: 'string' | 'number' | 'boolean' | 'unknown';
|
|
5
|
+
type: 'string' | 'number' | 'boolean' | 'array' | 'unknown';
|
|
6
6
|
}
|
|
7
7
|
export declare function getColumnInfo<RxDocType>(path: string, schema: RxJsonSchema<RxDocumentData<RxDocType>>): ColumnInfo;
|
|
8
8
|
//# sourceMappingURL=schema-mapper.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bun-sqlite-for-rxdb",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"author": "adam2am",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,7 +12,10 @@
|
|
|
12
12
|
"@types/better-sqlite3": "^7.6.13",
|
|
13
13
|
"@types/bun": "latest",
|
|
14
14
|
"better-sqlite3": "^12.6.2",
|
|
15
|
+
"fast-check": "^4.5.3",
|
|
16
|
+
"mingo": "^7.2.0",
|
|
15
17
|
"rxdb": "^16.21.1",
|
|
18
|
+
"sift": "^17.1.3",
|
|
16
19
|
"typescript": "^5.0.0"
|
|
17
20
|
},
|
|
18
21
|
"peerDependencies": {
|
|
@@ -40,8 +43,7 @@
|
|
|
40
43
|
"!dist/**/*.test.d.ts.map",
|
|
41
44
|
"!dist/**/*.d.ts.map",
|
|
42
45
|
"README.md",
|
|
43
|
-
"LICENSE"
|
|
44
|
-
"CHANGELOG.md"
|
|
46
|
+
"LICENSE"
|
|
45
47
|
],
|
|
46
48
|
"scripts": {
|
|
47
49
|
"build": "bun build src/index.ts --outdir dist --target bun && tsc --emitDeclarationOnly --declaration --outDir dist",
|