Repository navigation
Release v0.6.1
[0.6.1] - 2026-11-01
Correctness and speed release. Backups and restores survive a crash, stored procedure bodies run as their statements do, SPARQL follows SPARQL 1.1 in OPTIONAL, MINUS, BIND and FILTER EXISTS, GQL quantified patterns repeat as ISO GQL defines them, the query timeout stops every query, and dates, times, bytes and NaN keep their type through every binding. Plus a CSV and an RDF file loader, schema() with value types, and faster SPARQL lookups, Cypher multi-hop patterns, degree counts and bulk updates by key.
Changed
Queries and calls that ran in 0.6.0 and now fail or return another type (each fix is under Fixed). Results that change because a wrong answer was fixed are under Fixed only; every one in the differential test corpus is listed, with its reason, in scripts/difftest/reviewed/0.6.1.txt.
- Casts:
CASTof text that is no number fails with22018, to aDECIMAL(p, s)that is too small with22003, and a float outside the integer range, an infinity or NaN to an integer with22003; they gave null, the largest integer or 0.toIntegerandtoFloatof text that is no number still give null. - GQL patterns: a quantified pattern of more than one edge without an upper bound or over 16 repetitions fails, an unbounded walk around a cycle fails at the path budget instead of stopping at 100 hops, and
{3,1},*3..1or a quantifier both inside and after an edge's brackets is a syntax error. - SPARQL: an undeclared prefix other than
rdf,rdfs,xsd,owlandfn, a variable or quoted triple inINSERT DATAorDELETE DATA, andBINDto a variable in scope are syntax errors; N-Triples,INSERT DATAandbatch_insert_rdfrefuse a literal subject or a predicate that is not an IRI. - Indexes:
CREATE INDEXwith a name another index has fails (IF NOT EXISTSkeeps the existing one). A file with a named vector index cannot be opened by 0.6.0. - Transactions:
SERIALIZABLEis refused withGRAFEO-Q004(it ran as snapshot isolation);START TRANSACTION,COMMITandROLLBACKthrough a transaction object'sexecutefail with25000; in C#,Rollback()after a commit throws. - Files and backups: a file already open fails with
GRAFEO-S004(08000) and a restore without its manifest, cursor or full backup withGRAFEO-V001; an incremental backup into another directory, a snapshot whose catalog does not apply and a parameter nested over 128 levels are refused;hybrid_searchwithout an index it can read fails. - Calls and config: a procedure call with an unknown map key or an extra positional argument fails naming the parameters;
TierOverride::ForceDiskfor a section that cannot move to disk is refused byConfig::validate. - Bindings: Python
node["k"]andnode.get("k")return native values. In Go, C# and Dart a DATE, TIME, DURATION or ZONED DATETIME result is a typed value, and in Node.js its tag object ({ $time: '12:30:00+02:00' }); they were strings or maps. A C#DateTimeOffsetparameter is a ZONED DATETIME and a Gotime.Durationa DURATION.
WASM: faster (and larger)
- Built for speed: queries run about 1.6 times and inserts about 4.8 times as fast as in 0.6.0;
@grafeo-db/wasm-litegrows from about 940 KB to 1.1 MB gzipped and@grafeo-db/wasmfrom 1.6 to 1.7 MB. - The full package uses the lightweight regex engine, as lite does, about 260 KB smaller;
=~and SPARQLREGEXrun about as fast as in 0.6.0.
Added
schema()describes the data's shape: each label and edge type with its properties and their value types, and each edge type with the labels it connects, in Rust and every binding.- A native CSV loader:
load_nodes_csvandload_edges_csv(Python, Rust, sessions) and thegrafeo.load_nodes_csvandgrafeo.load_edges_csvprocedures load a typed CSV file in one transaction, checking its keys, about 2.7 times as fast as batch inserts. Experimental. - Loading RDF files and text:
load_rdf(path)andload_rdf_text(text, format)in Python and Rust load Turtle or N-Triples into the default or a named graph as one bulk write, about three times as fast as a batch insert in 0.6.0. - Query timeouts in Python and Node.js:
query_timeoutandexecute(..., timeout=)in Python,queryTimeoutin Node.js. - Errors say what to do in every binding: Python raises
GrafeoLockedErrorfor a database open elsewhere, Node.js errors carryerrorCode,gqlStatusandisRetryable, WASM errors their GQLSTATUS, and a Node.jsTransactionrolls back when disposed. - SQL/PGQ graph patterns are GQL's: label expressions, an element's own
WHERE, quantifiers,ANY SHORTESTandALL SHORTEST, path modes and path variables withPATH_LENGTH,NODESandEDGESinsideGRAPH_TABLE. A shortest path over more than one edge pattern is not supported yet. - SPARQL looks triples up from bound terms: a pattern, an
OPTIONAL, an alternative path or aUNIONon a bound subject or object finds its triples through the indexes, a group starts at its most selective pattern, and a property path from bound terms searches from them. LDBC IS1 on RDF runs about 7 times and IS4 about 24 times as fast, IC13 in under a millisecond (it took 6 s), and?s (v:KNOWS|^v:KNOWS) ?ffrom a bound?sin about 0.04 ms (it took 80 ms). - SPARQL keeps its statistics across small writes: a query after a write or a load no longer reads the whole store (an
INSERT DATAand a query: 1.4 ms, was 178 ms), and the RDF store's indexes are keyed by term ids, for 27 to 31% less memory (#659). - Faster queries: multi-hop patterns stream (
LIMIT 10over two hops in under a millisecond and no memory, was 0.4 s and 440 MB), Cypher patterns over several relationships are 2 to 4 times as fast, degree counts read the adjacency (about 3.5 times as fast grouped, 2 to 2.8 times without grouping), property reads, filters and grouping 1.1 to 1.3 times, and a shortest path between two nodes stops sooner (LDBC IC13 about 0.25 ms per pair, was 6.3).
Deriva
Changes for Deriva, which keeps its graph in an embedded Grafeo database through the Python binding.
- Bulk updates and reads:
update_nodes(labels, rows, key="id")updates existing nodes by key in one call (about 6 ms for 1,500 rows, where the same query took 500 ms; through an index on the key, 0.25 ms for 40 rows), andget_properties_batch(ids, keys)reads several properties of many nodes, also in Rust. grafeo[arrow]: the extra that installs pyarrow fornodes_to_arrow(),edges_to_arrow()andto_arrow().- Updates and merges by key without an index join once:
UNWIND $rows AS r MATCH (n:Method {id: r.id}) SET ...is about 60 times as fast, andMERGE(withupsert_nodes) of 1,500 rows takes about 20 ms (it took 5 s). - Faster label queries: grouping by
labels(n)about 27 times as fast,count(*)of a label from the store's count, anORof labels reads only those labels (about 2.5 times), an edge check of one type stops at the first edge (about 200 times on busy nodes), an index lookup looks past label checks (about 45 times), and a lookup by an indexed key on two labels checks both in the lookup. EXISTSruns once over the rows it checks, also insideORandNOT(about 3 times as fast), and anOPTIONAL MATCHfrom bound nodes reads only their edges (LDBC IC13 under a millisecond, where it took over 30 s).- Whole nodes from Python queries cost less: about 1.4 times
get_nodes_by_label, was 1.8 times.
Fixed
Every query result in the differential test corpus that differs from 0.6.0 is listed, with its reason, in scripts/difftest/reviewed/0.6.1.txt.
- Backups and restores survive a crash (#667, #677): a restore is on disk before it returns, so commits after it no longer replay onto the old data, and a failed one can be retried; a backup is durable before the log it covers is let go; backups run one at a time; an incremental backup with nothing new succeeds, and a broken chain fails with the new
GRAFEO-S005. - A restore replaces the catalog, and a restore that fails changes nothing.
- Transactions (#670): a failed commit ends the transaction in every binding; rolled-back writes no longer block others; a direct call that fails partway leaves nothing; checkpoints and copies keep raw store writes; time travel never sees a commit in progress, and inside a transaction checks the retained history.
- A write above a join reads the data as the statement started (#677), so it no longer changes a row twice or matches what it just created.
- Vector and text indexes, searches and edge-list imports follow the selected graph (#677).
- Migrating a 0.5.x file keeps its indexes, and compares the new file with the old database before replacing anything.
- No more aborts:
PROFILEof a count over a multi-hop pattern and of a SPARQLDELETE WHEREwithout variables, a SPARQL syntax error that looped until memory ran out, a parameter nested over 128 levels, thousands of conditions on a path or Gremlin branches (#668), a two-hop pattern through a node with over 65,536 paths, and values that wrapped around (the largest id, a WAL record over 4 GiB, an RDF ring over 2^32 terms). - GQL quantified patterns (#678): a
WHEREinside holds for each step, a segment of several edges repeats within its bounds, an unbounded walk is no longer cut at 100 hops,{,2}starts at 0, and(n:%)matches only labeled nodes. OPTIONAL MATCHandEXISTS: anOPTIONAL MATCHkeeps its rows when itsWHEREholds a subquery, and anEXISTSwith a condition no longer runs over nodes the query never asked about.- Procedures (#678):
OPTIONAL CALLkeeps the row with nulls; a stored procedure returns as many values as it declares, and aYIELDin another order picks by name; procedure columns follow the arguments; a body runs with the schema and constraint checks of its statements,USE GRAPHwith its grant checks, and a limit of 16 nested calls. - Expressions: aggregates inside other expressions and
LETvariables inside lists, maps andCASE(#539), severalLETdefinitions in order, negative list slices,IS TYPED LIST<NODE>,size()andtoList()of a vector (#585),all_differentandsameby value,Infinityin text, a float%by zero is NaN, and Cyphersum()of no values is 0. - Numbers:
toInteger(' 42 ')is 42 andtoInteger('4.2')4, a float to an integer no longer wraps around, and decimalsumandavgno longer depend on the order of the rows, nor do products and remainders that fit fail (#669). - Ordering and grouping: a TIMESTAMP and a ZONED DATETIME of one instant order and group together in GQL and SQL/PGQ,
GROUP BYwithoutORDER BYgives its groups in first-row order on every run and every database, also when they spill, and aggregates over a chain of edges read the variable they name. - Syntax: GQL
//comments, non-reserved words and double-quoted names as names, a laterINSERTcreating its new nodes, doubled backticks in Cypher names (#579), and compound types in Cypher DDL (#678). - Cypher and Gremlin:
shortestPathfrom a node to itself is no path, a variable-length relationship whose upper bound is below its lower bound (*3..1) matches nothing, as in openCypher, undirected variable-length counts no longer fail on the path budget, and Gremlincoalesce()andoptional()choose a branch per traverser (#668). - SQL/PGQ:
NODES(p)andEDGES(p)return nodes and edges (#678),ORDER BYan outer alias, parameters named after keywords, andLIMIT $nandOFFSET $n, with errors that name their clause. - A subquery that returns an edge in one part and a node in another returns each as what it is.
- The query timeout stops every query, also sorts, aggregates, joins and large
UNWINDs;range()near the largest integer stops at its end. - Vector search: the most similar rows above a threshold come first, a similarity filter gives the same rows with and without the index, embeddings written as lists are indexed (#587), and typed arrays are vectors in Node.js and WASM (#586).
- Indexes (#678): a name stands for one index, vector indexes keep their name, a text index drops as itself, names with a colon no longer collide, a multi-property index drops whole,
CREATE VECTOR INDEXtakesIF NOT EXISTS, andSHOW INDEXESandlist_indexes()also list the indexes made through the API. - Graph types: a node type takes every occurrence's properties, a graph typed by another schema's type is checked against it,
DROP GRAPHforgets its type,LIKEan untyped graph is the open type, andSHOW NODE TYPESwrites DDL. - Introspection:
schema()anddb.labels()list only what is in use, stored procedure errors say "Procedure", and EXPLAIN and PROFILE show the whole plan as it runs, with each operator's numbers on its own line, also with subqueries and index pushdowns. - SPARQL 1.1 (#701, #702, #703): a
FILTERinsideOPTIONALreads the whole solution, a group that opens withOPTIONALorMINUSstarts from one empty solution,FILTER EXISTSandNOT EXISTSonly filter,BINDto a variable in scope is refused, an unbound variable joins with what follows, andGRAPH ?gover a pattern without?ggives a row per named graph. - SPARQL
DELETE WHEREdeletes only what a match of its whole pattern holds: without a match it no longer deletes its triples without variables, and every triple of a match goes, not only the first. - SPARQL syntax: the standard prefixes are predefined,
[]is a blank node,VALUESafter the query andORDER BYa function call parse,EXPLAIN,EXPLAIN ANALYZEandPROFILEwork after the prologue, IRIs with\uescapes match, alternative paths with an inverse branch run,xsd:floatstays a float, andLOADsays it is not supported. N-Triples and Turtle read a dot right after a blank node or language tag and\u,\U,\band\fescapes. - Durations with a negative fraction of a second:
DURATION 'PT-1.5S'is minus one and a half seconds (it read as -0.5 s), and a duration of mixed signs is writtenP1MT-1.5S(it wasP1MT-1.-5S) and reads back in every binding; a duration part past 64 bits or a signed time offset (12:00+-1:00) is refused instead of wrapping around. - Dates, times and durations keep their GQL type both ways in Go, C#, Dart and Node.js: Go
time.Timeand the newgrafeo.Date,TimeandDuration; C# microseconds,DateOnly,TimeOnly,DateTimeOffset, and the newGrafeoTimeandGrafeoDuration; Dart's newGrafeoDate,GrafeoTime,GrafeoDurationandGrafeoZonedDateTime; Node.js the tag objects. - Bytes, NaN and infinities travel as
$bytesand$floattags in the C, Go, C# and Dart bindings and arrive as native values; Go decodes tags in nodes, edges, streams and AsOf reads, and its streams give numbers asjson.Number. - Parquet:
LOAD DATA FORMAT PARQUETreads DATE, TIMESTAMP, TIME and DECIMAL columns as their types, the Python wheel loads Parquet (uncompressed or Snappy), and another codec is named in the error. - Bindings: Node.js ES module imports name every export, Go frees finished transactions, Dart
rollback()after a failed commit does nothing, and WASM hasdetachDeleteNode(#678). - Data: decimal weights in graph algorithms (#678) and CSV imports with quoted line breaks (#678).
- Smaller fixes: a write conflict says so once; a procedure argument that fails keeps its GQLSTATUS; a damaged incremental backup is
GRAFEO-S002;PreparedCommit::commitreturns its own epoch; CDC events of named-graph triples name the graph;list_graphsis sorted; a JSON parameter with a tag beside other keys is a map; builds withtriple-storealone compile. - Docs: SPARQL reads in a transaction are not yet snapshot isolated (#718, planned for 0.6.2).
Deprecated
GrafeoDB::store(): its writes skip the write-ahead log, transactions and change capture. Write through a session or the direct API, and read throughsnapshot().- The
async-storagefeature, withGrafeoDB::async_wal_checkpointandasync_write_snapshot, which only wrapped a blocking call: callwal_checkpoint()fromtokio::task::spawn_blocking. From 0.7.0 theenterpriseprofile is metrics and tracing. Config::with_threads,with_query_logging,with_schema_constraints,without_schema_constraintsand their getters, which never had an effect.RdfStore::copy_graph: use SPARQLCOPYin a session, which is logged.CatalogError::InvalidCheck: nothing returns it; CHECK constraints come back later as DDL.
All are removed in 0.7.0.
Contributors
- Thanks to teipsum for reporting the SPARQL
OPTIONAL,MINUSandBINDbugs (#701, #702, #703), each with its measurements and the section of the spec. - Thanks to temporaryfix for decimal weights in the graph algorithms (#681), the test of a failed RDF commit (#683), the refusal of an incremental backup with a gap (#684), crash-safe backups (#685) and restores (#687, #689), backups that run one at a time (#690), time-travel reads that never see a commit in progress (#686), claims released after a rollback (#693) and time travel inside a transaction that checks retained history (#695), CSV fields with line breaks (#692), aggregates inside other expressions (#682),
OPTIONAL MATCHpatterns that read the rows before them (#698),OPTIONAL CALLof a procedure (#699), stored procedure results that fit their columns (#700), index lists with the indexes made through the API (#704), decimal products and remainders that fit (#691), test fixtures that build with any feature set (#694), direct calls that leave nothing when they fail, with raw store writes that checkpoints keep (#696), SQL/PGQ path nodes and edges (#705), compound types in Cypher type DDL (#706), anddetachDeleteNodein WASM (#708).
What's Changed
- Update README.md by @StevenBtw in #662
- fixed the WASM and arm64 musl release jobs by @StevenBtw in #663
- fixed the npm repository URLs by @StevenBtw in #665
- Fix/668 long statements by @StevenBtw in #680
- fix: use decimal weights in graph algorithms by @temporaryfix in #681
- deps(rust): bump the rust-dependencies group with 5 updates by @dependabot[bot] in #688
- test: cover RDF transaction WAL write failure recovery by @temporaryfix in #683
- fix: clamp time-travel reads to published epochs by @temporaryfix in #686
- fix: reject incremental backups that leave a chain gap by @temporaryfix in #684
- fix: sync backups before advancing the retention cursor by @temporaryfix in #685
- fix: publish synced restores and clean failed attempts by @temporaryfix in #687
- fix: keep published restores after staging cleanup failure by @temporaryfix in #689
- fix: serialize backup calls and destination writers by @temporaryfix in #690
- test: match spill fixtures to enabled features by @temporaryfix in #694
- fix: find aggregates inside composite expressions by @temporaryfix in #682
- fix: avoid intermediate overflow in decimal products and remainders by @temporaryfix in #691
- fix: release transaction claims after rollback by @temporaryfix in #693
- fix: preserve quoted line breaks in CSV imports by @temporaryfix in #692
- fix: retain historical snapshots inside transactions by @temporaryfix in #695
- fix(engine): undo failed immediate writes before publication by @temporaryfix in #696
- fix: return SQL path components as entity values by @temporaryfix in #705
- fix: parse compound property types in Cypher DDL by @temporaryfix in #706
- fix: expose transactional detachDeleteNode in WASM by @temporaryfix in #708
- Release 0.6.1 by @StevenBtw in #666
- Release 0.6.1 by @StevenBtw in #719
Full Changelog: v0.6.0...v0.6.1