@peerbit/indexer-sqlite3 1.2.11 → 1.2.12-b4531d8
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/peerbit/sqlite3-bundler-friendly.mjs +47 -36
- package/dist/peerbit/sqlite3-node.mjs +47 -36
- package/dist/peerbit/sqlite3.js +47 -36
- package/dist/peerbit/sqlite3.min.js +45 -37
- package/dist/peerbit/sqlite3.mjs +47 -36
- package/dist/peerbit/sqlite3.wasm +0 -0
- package/dist/peerbit/sqlite3.worker.min.js +44 -36
- package/dist/src/schema.js +1 -1
- package/dist/src/schema.js.map +1 -1
- package/package.json +78 -78
- package/src/schema.ts +1 -1
package/package.json
CHANGED
|
@@ -1,80 +1,80 @@
|
|
|
1
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
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
2
|
+
"name": "@peerbit/indexer-sqlite3",
|
|
3
|
+
"version": "1.2.12-b4531d8",
|
|
4
|
+
"description": "SQLite index for document store",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"types": "./dist/src/index.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
"*": {
|
|
10
|
+
"*": [
|
|
11
|
+
"*",
|
|
12
|
+
"dist/*",
|
|
13
|
+
"dist/src/*",
|
|
14
|
+
"dist/src/*/index"
|
|
15
|
+
],
|
|
16
|
+
"src/*": [
|
|
17
|
+
"*",
|
|
18
|
+
"dist/*",
|
|
19
|
+
"dist/src/*",
|
|
20
|
+
"dist/src/*/index"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"src",
|
|
26
|
+
"dist",
|
|
27
|
+
"!dist/e2e",
|
|
28
|
+
"!dist/test",
|
|
29
|
+
"!**/*.tsbuildinfo"
|
|
30
|
+
],
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./dist/src/index.d.ts",
|
|
34
|
+
"import": "./dist/src/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./sqlite.org": {
|
|
37
|
+
"types": "./dist/peerbit/sqlite.org/sqlite3.d.ts",
|
|
38
|
+
"import": "./dist/peerbit/sqlite.org/sqlite3.js"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"browser": {
|
|
42
|
+
"./dist/src/sqlite3.js": "./dist/src/sqlite3.browser.js"
|
|
43
|
+
},
|
|
44
|
+
"eslintConfig": {
|
|
45
|
+
"extends": "peerbit",
|
|
46
|
+
"parserOptions": {
|
|
47
|
+
"project": true,
|
|
48
|
+
"sourceType": "module"
|
|
49
|
+
},
|
|
50
|
+
"ignorePatterns": [
|
|
51
|
+
"!.aegir.js",
|
|
52
|
+
"test/ts-use",
|
|
53
|
+
"*.d.ts"
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"publishConfig": {
|
|
57
|
+
"access": "public"
|
|
58
|
+
},
|
|
59
|
+
"scripts": {
|
|
60
|
+
"clean": "aegir clean",
|
|
61
|
+
"copy-sqlite-wasm": "mkdir -p ./dist/peerbit/ && cp -r ../../../../node_modules/@sqlite.org/sqlite-wasm/sqlite-wasm/jswasm/. ./dist/peerbit/",
|
|
62
|
+
"build-worker": "node ../../../../node_modules/esbuild/bin/esbuild --bundle ./src/sqlite3.worker.ts --format=esm --outfile=./dist/peerbit/sqlite3.worker.min.js",
|
|
63
|
+
"build": "aegir build && npm run build-worker && npm run copy-sqlite-wasm",
|
|
64
|
+
"test": "aegir test",
|
|
65
|
+
"test:browser": "aegir clean && aegir test -t browser",
|
|
66
|
+
"test:node": "aegir clean && aegir test -t node",
|
|
67
|
+
"lint": "aegir lint"
|
|
68
|
+
},
|
|
69
|
+
"author": "dao.xyz",
|
|
70
|
+
"license": "MIT",
|
|
71
|
+
"dependencies": {
|
|
72
|
+
"better-sqlite3": "^11.8.1",
|
|
73
|
+
"@peerbit/indexer-interface": "2.0.6-b4531d8",
|
|
74
|
+
"@sqlite.org/sqlite-wasm": "^3.49.1-build2"
|
|
75
|
+
},
|
|
76
|
+
"devDependencies": {
|
|
77
|
+
"@types/better-sqlite3": "^7.6.12",
|
|
78
|
+
"@peerbit/indexer-tests": "1.1.9-b4531d8"
|
|
79
|
+
}
|
|
80
80
|
}
|
package/src/schema.ts
CHANGED
|
@@ -1401,7 +1401,7 @@ export const convertCountRequestToQuery = (
|
|
|
1401
1401
|
table,
|
|
1402
1402
|
);
|
|
1403
1403
|
return {
|
|
1404
|
-
sql: `SELECT count(
|
|
1404
|
+
sql: `SELECT count(DISTINCT ${table.primary!}) as count FROM ${table.name} ${query}`,
|
|
1405
1405
|
bindable,
|
|
1406
1406
|
};
|
|
1407
1407
|
};
|