rete-graph 0.2.0 → 0.3.1
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/README.md +21 -1
- package/dist/index.js +1027 -23
- package/dist/rete-graph.js +1028 -24
- package/dist/rete-graph.min.js +61 -10
- package/dist/rete_wasm_bg.wasm +0 -0
- package/index.d.ts +17 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -63,7 +63,27 @@ worker. The host serving the file must send CORS headers and honor `Range`.
|
|
|
63
63
|
`.value` / `.datatype` / `.lang`, plus `.toJS()` (number/boolean/BigInt for
|
|
64
64
|
common XSD types) and `.n3`. Also: `queryRaw`, `query(q, {reason: true})`
|
|
65
65
|
(OWL 2 QL entailment), `prefixSearch`, `textSearch`, `schema`, `graphNames`,
|
|
66
|
-
`info`,
|
|
66
|
+
`info`, `card()` / `examples()` (the file's embedded Dataset Card and its
|
|
67
|
+
example queries), `shacl(shapes)` (SHACL Core validation), and on lazily
|
|
68
|
+
opened graphs `stats()` / `contentHash()`. `wasm` re-exports the raw engine
|
|
69
|
+
for anything this wrapper doesn't wrap.
|
|
70
|
+
|
|
71
|
+
## Local files, read lazily (Node)
|
|
72
|
+
|
|
73
|
+
A `file://` URL is read exactly like a remote one — only the byte ranges a
|
|
74
|
+
query touches — so a multi-gigabyte graph on disk is queryable without loading
|
|
75
|
+
it into memory:
|
|
76
|
+
|
|
77
|
+
```js
|
|
78
|
+
import { pathToFileURL } from "node:url";
|
|
79
|
+
const g = await open(pathToFileURL("/data/huge.rete").href);
|
|
80
|
+
g.card().title; // two small reads, whatever the file's size
|
|
81
|
+
g.query("SELECT ?s WHERE { ?s a <urn:Thing> } LIMIT 10");
|
|
82
|
+
g.stats(); // { fileLength, bytes, requests }
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Passing bytes still works and is right for small files; `file://` is the way
|
|
86
|
+
to keep big ones out of memory.
|
|
67
87
|
|
|
68
88
|
## Building from source
|
|
69
89
|
|