bun-sqlite-for-rxdb 1.0.1 → 1.1.3
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/CHANGELOG.md +48 -0
- package/dist/connection-pool.d.ts +4 -0
- package/dist/connection-pool.d.ts.map +1 -0
- package/{src/index.ts → dist/index.d.ts} +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13220 -0
- package/dist/instance.d.ts +42 -0
- package/dist/instance.d.ts.map +1 -0
- package/dist/query/builder.d.ts +6 -0
- package/dist/query/builder.d.ts.map +1 -0
- package/dist/query/operators.d.ts +21 -0
- package/dist/query/operators.d.ts.map +1 -0
- package/dist/query/schema-mapper.d.ts +8 -0
- package/dist/query/schema-mapper.d.ts.map +1 -0
- package/dist/query/smart-regex.d.ts +6 -0
- package/dist/query/smart-regex.d.ts.map +1 -0
- package/dist/rxdb-helpers.d.ts +28 -0
- package/dist/rxdb-helpers.d.ts.map +1 -0
- package/dist/statement-manager.d.ts +15 -0
- package/dist/statement-manager.d.ts.map +1 -0
- package/dist/storage.d.ts +4 -0
- package/dist/storage.d.ts.map +1 -0
- package/dist/types.d.ts +13 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +11 -3
- package/.serena/project.yml +0 -84
- package/ROADMAP.md +0 -532
- package/benchmarks/benchmark.ts +0 -145
- package/benchmarks/case-insensitive-10runs.ts +0 -156
- package/benchmarks/fts5-1m-scale.ts +0 -126
- package/benchmarks/fts5-before-after.ts +0 -104
- package/benchmarks/indexed-benchmark.ts +0 -141
- package/benchmarks/new-operators-benchmark.ts +0 -140
- package/benchmarks/query-builder-benchmark.ts +0 -88
- package/benchmarks/query-builder-consistency.ts +0 -109
- package/benchmarks/raw-better-sqlite3-10m.ts +0 -85
- package/benchmarks/raw-better-sqlite3.ts +0 -86
- package/benchmarks/raw-bun-sqlite-10m.ts +0 -85
- package/benchmarks/raw-bun-sqlite.ts +0 -86
- package/benchmarks/regex-10runs-all.ts +0 -216
- package/benchmarks/regex-comparison-benchmark.ts +0 -161
- package/benchmarks/regex-real-comparison.ts +0 -213
- package/benchmarks/run-10x.sh +0 -19
- package/benchmarks/smart-regex-benchmark.ts +0 -148
- package/benchmarks/sql-vs-mingo-benchmark.ts +0 -210
- package/benchmarks/sql-vs-mingo-comparison.ts +0 -175
- package/benchmarks/text-vs-jsonb.ts +0 -167
- package/benchmarks/wal-benchmark.ts +0 -112
- package/docs/architectural-patterns.md +0 -1336
- package/docs/id1-testsuite-journey.md +0 -839
- package/docs/official-test-suite-setup.md +0 -393
- package/nul +0 -0
- package/src/changestream.test.ts +0 -182
- package/src/cleanup.test.ts +0 -110
- package/src/collection-isolation.test.ts +0 -74
- package/src/connection-pool.test.ts +0 -102
- package/src/connection-pool.ts +0 -38
- package/src/findDocumentsById.test.ts +0 -122
- package/src/instance.ts +0 -382
- package/src/multi-instance-events.test.ts +0 -204
- package/src/query/and-operator.test.ts +0 -39
- package/src/query/builder.test.ts +0 -96
- package/src/query/builder.ts +0 -154
- package/src/query/elemMatch-operator.test.ts +0 -24
- package/src/query/exists-operator.test.ts +0 -28
- package/src/query/in-operators.test.ts +0 -54
- package/src/query/mod-operator.test.ts +0 -22
- package/src/query/nested-query.test.ts +0 -198
- package/src/query/not-operators.test.ts +0 -49
- package/src/query/operators.test.ts +0 -70
- package/src/query/operators.ts +0 -185
- package/src/query/or-operator.test.ts +0 -68
- package/src/query/regex-escaping-regression.test.ts +0 -43
- package/src/query/regex-operator.test.ts +0 -44
- package/src/query/schema-mapper.ts +0 -27
- package/src/query/size-operator.test.ts +0 -22
- package/src/query/smart-regex.ts +0 -52
- package/src/query/type-operator.test.ts +0 -37
- package/src/query-cache.test.ts +0 -286
- package/src/rxdb-helpers.test.ts +0 -348
- package/src/rxdb-helpers.ts +0 -262
- package/src/schema-version-isolation.test.ts +0 -126
- package/src/statement-manager.ts +0 -69
- package/src/storage.test.ts +0 -589
- package/src/storage.ts +0 -21
- package/src/types.ts +0 -14
- package/test/rxdb-test-suite.ts +0 -27
- package/tsconfig.json +0 -31
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,53 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.1.0] - 2026-02-23
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- **schema.indexes Support** (v1.1.0)
|
|
7
|
+
- Dynamic index creation from schema.indexes definitions
|
|
8
|
+
- Supports single-field indexes: `['age']`
|
|
9
|
+
- Supports compound indexes: `['age', 'status']`
|
|
10
|
+
- Uses `json_extract()` for JSONB fields
|
|
11
|
+
- Proper index naming: `idx_users_v0_age_status`
|
|
12
|
+
- 9 lines of implementation code
|
|
13
|
+
- Research validated: 4/5 RxDB storage plugins implement this
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- **ORDER BY Optimization** (v1.1.0)
|
|
17
|
+
- Removed redundant SQL `ORDER BY id` (we sort in-memory anyway)
|
|
18
|
+
- Eliminates temp B-tree overhead in SQLite
|
|
19
|
+
- Research finding: We already sort at line 226, SQL ORDER BY was redundant
|
|
20
|
+
|
|
21
|
+
### Performance
|
|
22
|
+
- **29.8% faster queries** (165.43ms → 116.09ms avg on 100k docs)
|
|
23
|
+
- Test 1 (age > 50): 20.6% faster
|
|
24
|
+
- Test 2 (status = "active"): 22.1% faster
|
|
25
|
+
- Test 3 (age > 30 AND status): 26.8% faster
|
|
26
|
+
- Test 4 (age BETWEEN 25-35): 51.5% faster!
|
|
27
|
+
|
|
28
|
+
### Test Results
|
|
29
|
+
- **Local tests: 138/138 pass (100%)** ✅
|
|
30
|
+
- **Official RxDB tests: 122/122 pass (100%)** ✅
|
|
31
|
+
- **Total: 260/260 tests pass (100%)** 🎉
|
|
32
|
+
|
|
33
|
+
### Research
|
|
34
|
+
- **3 research agents deployed** (2 codebase + 1 web)
|
|
35
|
+
- Verified implementation correctness vs other RxDB storages
|
|
36
|
+
- Analyzed ORDER BY patterns in storage plugins
|
|
37
|
+
- Researched SQLite covering indexes and optimization
|
|
38
|
+
- **Key findings:**
|
|
39
|
+
- Our implementation matches standard RxDB patterns
|
|
40
|
+
- Better than official SQLite Trial (which has no indexes)
|
|
41
|
+
- ORDER BY id was causing temp B-tree overhead
|
|
42
|
+
- Removing it eliminated redundant sorting
|
|
43
|
+
|
|
44
|
+
### Documentation
|
|
45
|
+
- Added Pattern #28: schema.indexes Support
|
|
46
|
+
- Added Pattern #29: ORDER BY Optimization
|
|
47
|
+
- Updated ROADMAP.md with implementation results
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
3
51
|
## [1.0.1] - 2026-02-23
|
|
4
52
|
|
|
5
53
|
### Added
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection-pool.d.ts","sourceRoot":"","sources":["../src/connection-pool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAUtC,wBAAgB,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAgB5E;AAED,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAS1D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAClD,YAAY,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC"}
|