rust-kgdb 0.1.10 → 0.1.11

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 +54 -0
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -380,6 +380,60 @@ db.updateDelete(`
380
380
 
381
381
  ---
382
382
 
383
+ ## Sample Application
384
+
385
+ ### Knowledge Graph Demo
386
+
387
+ A complete, production-ready sample application demonstrating enterprise knowledge graph capabilities is available in the repository.
388
+
389
+ **Location**: [`examples/knowledge-graph-demo/`](../../examples/knowledge-graph-demo/)
390
+
391
+ **Features Demonstrated**:
392
+ - Complete organizational knowledge graph (employees, departments, projects, skills)
393
+ - SPARQL SELECT queries with star and chain patterns (WCOJ-optimized)
394
+ - Aggregations (COUNT, AVG, GROUP BY, HAVING)
395
+ - Property paths for transitive closure (organizational hierarchy)
396
+ - SPARQL ASK and CONSTRUCT queries
397
+ - Named graphs for multi-tenant data isolation
398
+ - Data export to Turtle format
399
+
400
+ **Run the Demo**:
401
+
402
+ ```bash
403
+ cd examples/knowledge-graph-demo
404
+ npm install
405
+ npm start
406
+ ```
407
+
408
+ **Sample Output**:
409
+
410
+ The demo creates a realistic knowledge graph with:
411
+ - 5 employees across 4 departments
412
+ - 13 technical and soft skills
413
+ - 2 software projects
414
+ - Reporting hierarchies and salary data
415
+ - Named graph for sensitive compensation data
416
+
417
+ **Example Query from Demo** (finds all direct and indirect reports):
418
+
419
+ ```typescript
420
+ const pathQuery = `
421
+ PREFIX ex: <http://example.org/>
422
+ PREFIX foaf: <http://xmlns.com/foaf/0.1/>
423
+
424
+ SELECT ?employee ?name WHERE {
425
+ ?employee ex:reportsTo+ ex:alice . # Transitive closure
426
+ ?employee foaf:name ?name .
427
+ }
428
+ ORDER BY ?name
429
+ `
430
+ const results = db.querySelect(pathQuery)
431
+ ```
432
+
433
+ **Learn More**: See the [demo README](../../examples/knowledge-graph-demo/README.md) for full documentation, query examples, and how to customize the knowledge graph.
434
+
435
+ ---
436
+
383
437
  ## API Reference
384
438
 
385
439
  ### GraphDB Class
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rust-kgdb",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "description": "High-performance RDF/SPARQL database with 100% W3C compliance and WCOJ execution",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -21,7 +21,7 @@
21
21
  "build:debug": "napi build --platform native/rust-kgdb-napi",
22
22
  "prepublishOnly": "napi prepublish -t npm",
23
23
  "test": "jest",
24
- "version": "0.1.10"
24
+ "version": "0.1.11"
25
25
  },
26
26
  "keywords": [
27
27
  "rdf",
@@ -56,10 +56,10 @@
56
56
  "*.node"
57
57
  ],
58
58
  "optionalDependencies": {
59
- "rust-kgdb-win32-x64-msvc": "0.1.10",
60
- "rust-kgdb-darwin-x64": "0.1.10",
61
- "rust-kgdb-linux-x64-gnu": "0.1.10",
62
- "rust-kgdb-darwin-arm64": "0.1.10",
63
- "rust-kgdb-linux-arm64-gnu": "0.1.10"
59
+ "rust-kgdb-win32-x64-msvc": "0.1.11",
60
+ "rust-kgdb-darwin-x64": "0.1.11",
61
+ "rust-kgdb-linux-x64-gnu": "0.1.11",
62
+ "rust-kgdb-darwin-arm64": "0.1.11",
63
+ "rust-kgdb-linux-arm64-gnu": "0.1.11"
64
64
  }
65
65
  }