reddb-cli 0.1.2-next.55 → 0.1.2-next.61

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.
Files changed (2) hide show
  1. package/README.md +47 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -240,6 +240,39 @@ Remote backends: S3, R2, DigitalOcean Spaces, GCS, Turso, Cloudflare D1, local f
240
240
 
241
241
  ---
242
242
 
243
+ ## KV REST API
244
+
245
+ Every collection doubles as a key-value store with dedicated REST endpoints:
246
+
247
+ ```bash
248
+ # Write a key
249
+ curl -X PUT http://127.0.0.1:8080/collections/settings/kvs/theme \
250
+ -H 'content-type: application/json' -d '{"value": "dark"}'
251
+
252
+ # Read a key
253
+ curl http://127.0.0.1:8080/collections/settings/kvs/theme
254
+
255
+ # Delete a key
256
+ curl -X DELETE http://127.0.0.1:8080/collections/settings/kvs/theme
257
+ ```
258
+
259
+ Config keys work the same way -- read, write, or delete any `red_config` setting at runtime:
260
+
261
+ ```bash
262
+ # Set a config key
263
+ curl -X PUT http://127.0.0.1:8080/config/red.ai.default.provider \
264
+ -d '{"value": "groq"}'
265
+
266
+ # Read a config key
267
+ curl http://127.0.0.1:8080/config/red.ai.default.provider
268
+
269
+ # Or manage config from SQL
270
+ SET CONFIG red.ai.default.provider = 'groq'
271
+ SHOW CONFIG red.ai
272
+ ```
273
+
274
+ ---
275
+
243
276
  ## 3 Deployment Modes
244
277
 
245
278
  | Mode | Think of it as... | Access via |
@@ -252,6 +285,20 @@ Same storage format across all three. Start embedded, scale to server, expose to
252
285
 
253
286
  ---
254
287
 
288
+ ## Performance
289
+
290
+ RedDB uses multiple optimization techniques for fast queries at scale:
291
+
292
+ - **Hash Join** -- O(n+m) joins instead of O(n*m), auto-selected for large datasets
293
+ - **Parallel Segment Scanning** -- sealed segments scanned in parallel via rayon
294
+ - **Lazy Graph Materialization** -- only loads reachable nodes instead of full graph
295
+ - **Pre-filtered Vector Search** -- metadata filters applied before HNSW indexing
296
+ - **Index-Assisted Scans** -- bloom filter + hash index hints for WHERE clauses
297
+ - **Column Projection Pushdown** -- only materializes SELECT columns
298
+ - **Query Plan Caching** -- LRU cache with 1h TTL for repeated queries
299
+
300
+ ---
301
+
255
302
  ## Quick Start
256
303
 
257
304
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reddb-cli",
3
- "version": "0.1.2-next.55",
3
+ "version": "0.1.2-next.61",
4
4
  "description": "JavaScript/TypeScript SDK for RedDB - unified multi-model database",
5
5
  "type": "commonjs",
6
6
  "main": "./sdk/red-sdk.js",