Repository navigation
Release v0.6.0
[0.6.0] - 2026-10-23
Storage release: a new single-file format on a new storage engine, with online checkpoints and backups, snapshot isolation on every read path and time travel over a retained history. Plus exact decimals, a store contract for backends of your own, binding parity across C, Go, C#, Dart, Node.js and WASM, and a large round of correctness fixes in GQL, Cypher, SQL/PGQ and SPARQL.
0.6.0-beta.1 (2026-10-11) was a preview of this release; this section covers everything since 0.5.44.
Breaking release. As a minor release before 1.0, 0.6.0 breaks things (see Versioning). Before you upgrade:
- Database files are migrated on first open: the first read-write open converts a 0.5.x database to the new format and keeps the old files as
.pre-0.6. 0.5.x cannot open the result, so stop every 0.5.x process first; 0.7.0 will not read 0.5.x files. Backups and snapshots have new versions: take a full backup after the upgrade. - Minimum Rust version 1.99.0 (was 1.91.1).
- Some query results change: a GQL or SQL/PGQ number with a point is an exact decimal, overflow and division by zero are errors, GQL sorts nulls last, SPARQL returns RDF terms, and some statements that gave a wrong answer now fail. See the Breaking entries under Changed, and Result changes.
- Rust API: a new store contract (
ReadView,GraphBackend,Snapshot, the row-group store in place ofLpgStore), direct reads that returnResult, and#[non_exhaustive]configuration and result types. - Bindings: a read that fails is an error, never an empty answer; some C, Go, C#, Dart and Python signatures change, and Python RDF terms no longer equal plain strings.
- CLI: standard output holds only results, and
--quiethides only status lines. - Deprecations: what 0.6.0 replaces is deprecated and removed in 0.7.0 (see Deprecated).
Upgrading to 0.6 lists every breaking change and what to change.
Added
- Time travel: a database can keep its history for a retention window (
Config::with_history_retention:HistoryRetention::Duration(..)orForever; off by default and free when off), stored in the file and kept through checkpoints, crashes and reopens.GrafeoDB::as_of(point)gives a read-onlyAsOfViewas of an epoch, a time, a GQLZONED DATETIMEorTimePoint::ago(duration), withexecute_as_ofandepoch_as_of; a point older than the retained history fails with "history before ... is not retained". Python, Node.js, WASM, C, C#, Go and Dart set the retention at open and haveas_of,execute_as_ofandepoch_as_of; a point is never guessed from a bare number (Python: anintepoch, an awaredatetimeor atimedelta; Node.js and WASM: abigint, aDateor{ ago: milliseconds }; C:GRAFEO_POINT_*; C#, Go and Dart:TimePoint). - Exact decimals (#610): up to 38 digits with their scale (
1.50), exact in arithmetic, comparison, grouping and aggregates. GQLCAST(x AS DECIMAL(10, 2))andDEC,toDecimal(x[, precision, scale])in GQL, Cypher and SQL/PGQ,DECIMAL(p, s)property types in type DDL, and SQL/PGQCAST(x AS type)for every SQL type it knows, withDECIMAL,NUMERIC,DATEandTIMEcolumns inCREATE PROPERTY GRAPH. Python reads and writesdecimal.Decimal, Node.js and WASM{"$decimal": "1.50"}, C#, Dart and Go a decimal type of their own, and the Arrow exportDecimal128. - Backends of your own (#416):
GrafeoDB::with_store(backend, Config::persistent(path))runs the database's transactions in aGraphBackendof your own, with rollbacks, savepoints and change data capture, and is durable through its own WAL,<path>.wal, replayed after a crash from the epoch the backend reports durable.grafeo::storeholds the contract, and theconformancefeature publishes the test suite the built-in store passes (conformance_suite!(MyStore, make, GAPS)); thegrafeocrate's tests hold a complete example backend. Implementing the contract is experimental through 0.6.x. - API stability levels and an upgrade guide (#493): every public API is Stable unless its documentation marks it
# Stability: Experimental, in Rust and in the binding docs that wrap it; API Stability lists them and CI keeps both in step. Upgrading to 0.6 lists every breaking change from 0.5.x. - The GQLSTATUS of every error (#639, #643): Python
GrafeoError.gql_status, Node.js and WASMgqlStatus(TypeScriptGrafeoError), Cgrafeo_last_error_gql_status(), Go's new*grafeo.Error(still matchingErrDatabase), C#GrafeoException.GqlStatusand DartGrafeoException.gqlStatusgive the ISO GQL status (22003,22012,42001, ...) next to the Grafeo code. The Node.js package's entry module is nowgrafeo.js(typesgrafeo.d.ts). - New error codes:
GRAFEO-S002for a damaged file or WAL, naming the file and offset (PythonGrafeoCorruptionError, RustError::Corruption, which replacesStorageError::Corruption);GRAFEO-T008after a commit that panicked midway, until the database is reopened (#412);GRAFEO-T009andGRAFEO-T010for a commit whose WAL write failed (see Fixed); andGRAFEO-Q004for what the build or database cannot run. - GQL
USE g <statement>(grafeo-web#55): a query or write afterUSE [GRAPH] gruns on graph g, in a transaction or outside, and leaves the session's graph as it is; each operand of aUNIONorNEXTchain may repeat it. - Query language additions: GQL
=~regular expression match (a Grafeo extension, see Conformance); GQLGROUP BYon aRETURNalias, with items computed from the keys; CypherRETURN *, r.years AS y; Gremlin anonymous traversals__.(#631); SQL/PGQDROP PROPERTY GRAPH; and the numbers.5,5.and1_000. - Binding parity (#441): C gets node and edge batches with properties, batch vector search, write counters, change history, upserts with their summary and graph handles (
grafeo_graph(db, name)), and Go, C# and Dart wrap all of it. Node.js gets graph handles (db.graph(name)). WASM gets writecounters, batch vector search and, in thelpgandfullbuilds, node and edge batches, upserts anddb.graph(name);executeRawWithParamsandexecuteRawWithLanguageAndParams(#574); andexecutionTimeMson raw results. - A node's edges without a query (#402):
get_node_edges(node, direction, edge_types)returns(neighbor, edge)pairs, in Rust, Python, Node.js, C (typed id arrays), Go, C#, Dart and every WASM build.detach_delete_node(id)(#465) removes a node and its edges as one change in every binding; change data capture marks each removed edge withdeleted_with. - Automatic checkpoints by WAL size and interval (#426):
set_checkpoint_triggers(Rust, Python, Node.js, C, Go, C#, Dart) andConfig::with_checkpoint_wal_size, off by default.checkpoint_status()reports the triggers, the last checkpoint and failed automatic checkpoints with the last error; a failure is logged and retried. - Query metadata (#461, #464):
PROFILEresults hold the operator tree as data (QueryResult::profile,result.profile, WASMprofile; experimental), andPROFILEnames an operator a fast path absorbed instead of listing it with 0 rows.rows_scannednow counts the rows read from storage, and every query, in every language, reportsexecution_time_ms.QueryResult::kind(grafeo::ResultKind) says whether a result holds rows, a boolean (SPARQL ASK) or a graph (CONSTRUCT).EXPLAINnames the index a MERGE uses (#288). - Graph algorithms on projections and named graphs (#566):
projection=indb.algorithms, aprojectionargument for algorithm procedures, anddb.graph(name).algorithms. Undirected PageRank (directed=False,{directed: false}), andkey=to key per-node results by a node property, which also makes PageRank, Louvain and label propagation independent of load order (see Determinism). - Search filters and text index options (#397, #351):
hybrid_searchandtext_searchtake the property filters ofvector_search, applied before fusion so a scoped search returns up tokresults. A text index takes BM25k1andb, a tokenizer (simple,standard,cjk_bigram) and stop words, through every binding andCREATE INDEX ... USING TEXT {...}, kept with the index. ZONED DATETIME,LOCAL DATETIMEand typed lists as property types (#569), in every form of type DDL, checked on write and kept after a reopen.- Rust API additions:
Session::statement_writes(whether a statement writes, without running it),grafeo::import::import_nodes(CSV or JSON Lines, behind the Python, Node.js and CLI imports),GrafeoDB::set_stored_config,Configgetters for every setting and the builderswith_wal(),without_wal(),without_schema_constraints(),with_cdc_retention(),with_encryption()andwith_wal_salvage(). Thegrafeocrate exportsStorageFormatandCdcRetentionConfig, and its newencryptionfeatureEncryptionConfig,KeyChain,PasswordKeyProviderandrestore_to_epoch_withfor encrypted backups. The first two calls are experimental. - C library release archives with every feature (#636):
grafeo-c-<tag>-<target>-defaultand-allarchives with the library,grafeo.hand aFEATURES.txt;allexports every query language. Thegrafeo-<tag>-<target>archives holdgrafeo.htoo, andchecksums.txtlists every archive. - Python 3.15 is tested and listed as supported; the existing wheels install on it.
Changed
- Breaking: a new single-file format, migrated on first open (#555): every database is one file, whatever its extension, with its WAL in
<path>.walwhile it is open. The first read-write open of a 0.5.x.grafeofile migrates it and keeps it as<file>.pre-0.6(WAL<file>.pre-0.6.wal); a 0.5.x WAL directory becomes a file at the same path, with its indexes (#401), and is kept as<path>.pre-0.6/. Read-only opens leave a 0.5.x database as it is. A migrated vector index gets the default parameters (cosine distance), with a warning: create it again if it used others. Properties 0.5.x stored as null, counter values among them, are gone after the migration. The directory must be writable, and builds without thewalfeature refuse a 0.5.x database whose WAL holds changes. Opening a directory that is not a 0.5.x database fails, an empty one included, andsave()fails on an existing path. See Upgrading from 0.5. - A new storage engine: the graphs live in a row-group store (#432), written in chunks of at most 65,536 rows and 1 MiB (#555), so checkpoints and opens never hold a whole section in memory (see Memory) and a node can have any number of labels. The catalog is stored as typed records (#517), the WAL is a chain of checksummed segments (encrypted per segment for an encrypted database), RDF triples are stored as term ids, and a file records its format revision, which a build that does not know it refuses. Vector and text indexes are built from the data when a database opens, so an open with large indexes takes longer.
- Upgrading from 0.6.0-beta.1: a beta WAL that still holds commits is replayed and checkpointed on the first read-write open. A beta file with RDF triples is rewritten to the term-id format and the old file and WAL are kept as
<path>.pre-0.6.0(the beta cannot open the rewritten file; a read-only open reads it as it is). Beta snapshots and incremental backups still restore. - A database file keeps the configuration it was created with (#551): the graph model, backward edges, schema constraints, WAL and sync mode, memory limit, tier overrides and an in-directory spill path apply to every open that does not set them. The graph model and backward edges are fixed at creation: an open that sets another value fails. Change the stored values with
GrafeoDB::set_stored_config. - Checkpoints no longer hold writers off, and write only what changed (#430, #449): commits wait only while a checkpoint takes its snapshot and writes the catalog and RDF data, and it writes only the changed chunks of the graph (after one value set in 70,000 nodes, two chunks).
- Backups and snapshots:
backup_full()runs online from a snapshot, without a checkpoint first (#362), and so dosave(),to_memory()andexport_snapshot();save()andbackup_full()write to<target>.partialand rename it when complete. Incremental backups copy WAL segments (backup file version 2): take a full backup after the upgrade. Breaking: the backup manifest and cursor are JSON, which 0.5.x cannot read. Snapshots are version 5 and keep the whole catalog (constraint and index names, index options, graph types, schemas, procedures) (#551); version 4 snapshots still import. - Breaking (Rust):
compact()returns aCompactReportand no longer builds a separate store: it checkpoints a persistent database, drops the versions no reader needs and encodes the property columns in memory, which reads keep using without decoding. Transactions, indexes and named graphs work the same before and after it, and it no longer needs thecompact-storefeature.layered_store(),compact_tiered(), thecompact_tieredmodule andadmin::CompactionStatsare removed. A database compacted by 0.5.44 or older opens with its compacted data folded in (see Compact Store). - Commits are pipelined: commits of several sessions that wait for the disk in
Syncmode share one sync, and a transaction that starts while another commit is in progress reads the last published commit instead of waiting; a write to what that commit wrote fails with the retryableGRAFEO-T001. Change data capture timestamps events in commit order. - Writes outside a transaction are transactions of their own (#536): every write statement, direct call and batch call with no transaction open commits on its own and leaves nothing when it fails, also with auto-commit off; one made while a transaction is open runs beside it and conflicts (
GRAFEO-T001) with what that transaction changed first.DROP GRAPHand the SPARQLCLEAR,DROP,COPY,MOVEandADDfail withGRAFEO-T001while an open transaction has changes in the graph. The planner's statistics count committed data only. - Reads of an earlier epoch read the retained history:
execute_at_epoch,execute_as_of,Session::set_viewing_epochand the*_at_epochreads see the values, labels, nodes and edges of then, in every build, and fail for an epoch older than what the database keeps (without a retention window, any epoch before the last write). Breaking (Rust, Python):get_node_at_epoch,get_edge_at_epochandget_node_property_at_epochreturn aResult,Ok(None)for absent and an error (PythonGrafeoError) for an epoch not retained. - Breaking: a GQL or SQL/PGQ number with a point is an exact decimal (#610):
0.1 + 0.2 = 0.3holds and1.50keeps its digits.1.5e0and the suffixesFandDmake a float,Ma decimal. Decimal with integer gives a decimal, with float a float;sqrt,sinand the other float functions return a float. Write1.0e0 / 0.0e0for an infinity. Cypher1.5stays a float. - Breaking: integer and decimal overflow and division by zero fail the query (#639): in GQL, Cypher and SQL/PGQ they fail with GQLSTATUS
22003or22012(codeGRAFEO-Q006), where they gave null; a sum adds in 128 bits and fails only when the final value does not fit. Float operations keep their IEEE results, null stays null, andANDandORskip their right side when the left decides, soWHERE n.v <> 0 AND 10 / n.v > 1is safe. - Breaking: SPARQL numbers follow the XPath type promotion of SPARQL 1.1 (#610):
1.5is an exact decimal,5 / 2is2.5(it was2), and integer arithmetic past 64 bits goes on as decimals. Computed numbers are literals in canonical form, the XPath casts (xsd:decimal(...),xsd:integerand the others) now convert, and comparisons with NaN are false. - Breaking: SPARQL results hold RDF terms (#464): each IRI, blank node and literal comes back as the exact term with its lexical form, language tag and datatype, where it was a string or a number (Rust
Value::RdfTerm; Pythongrafeo.IRI,LiteralandBlankNode, subclasses ofstr; RDF/JS terms in Node.js and WASM;RdfTermin C#, Go and Dart; a$termtag in the C library's JSON). ASK gives one boolean. GraphQL over RDF still gives plain values, and the Arrow, pandas and polars exports give a literal of a known XSD type as its native value. Breaking (Python): the term classes compare and hash as RDF terms, as rdflib's do, soIRI("http://example.org/a") != "http://example.org/a"; compare withstr(term). - Breaking: new limits and refusals: a GQL
WHEREorFILTERright afterINSERT,CREATE,MERGEorDELETEis an error (it filtered before the write); a statement nests at most 64 levels and its plan at most 128 (#573), where longAND,ORandUNIONchains andINSERTlists do not count; type DDL refuses a property type Grafeo does not support (INT32, a typo), which declaredANY; property values nest at most 128 levels (a 0.5.x database that holds a deeper one fails to migrate: change it with 0.5.x first); andSESSION SET TIME ZONEtakes a UTC offset only ('+01:00','Z'), failing with 22009 for a named zone, which was stored and never used. RustSession::set_time_zonereturns aResult. - Breaking: GQL sorts nulls last by default (#571), ascending and descending; Cypher keeps the openCypher order.
- Error codes say what kind of mistake it is (#588): a mistake in the query text is
GRAFEO-Q002, what the build or database cannot runGRAFEO-Q004, a value or name a call gives that does not fitGRAFEO-V001, a statement that fails on its dataGRAFEO-Q006, a direct write to a missing node or edgeGRAFEO-V002orGRAFEO-V003, andGRAFEO-X001now means a bug in Grafeo. Every query error message starts with its code.QueryResult::gql_statusis00001for a statement without a result. - Faster planning around indexes and labels (#456, #457, #455, #540, #546, #463): an indexed
INinside anANDchain uses the index, a label inWHERE(or anORof labels) scans only that label, a multi-label pattern scans its smallest label, a laterMATCHjoined by property values uses a hash join (300 files and 3,000 type definitions: 303 ms to 3 ms), function calls resolve once per query,schema()counts labels without building nodes, andDISTINCTover a variable-length pattern finds each reached node once. Edge upserts pinned byid(),WHERE id(tgt) IN $idson an edge target and aWHEREafterOPTIONAL MATCH ... WITHno longer scan every node.EXPLAINshows what is used. - Faster execution: a repeated statement without parameters skips parsing, a statement with parameters is planned once and refilled per call (as prepared statements are), filters and projections read only the property they need (2.5 to 3 times faster than 0.5.44 over many rows), label scans check 64 rows' visibility at once, edge reads skip the other end, SPARQL joins,
DISTINCTandCONSTRUCTrun on term ids (20 to 66% faster), conditions on variable-length edges prune the search as it walks, and a file database no longer creates a spill directory per statement (#565). - Direct single writes are slower than in 0.5.44:
create_node,set_node_propertyandcreate_edgetake about 0.1 to 0.2 microseconds more per call, as each commits like a transaction. Batch calls and upserts commit once and are the fast path. - Breaking (Rust): the store contract (#416, #432):
GrafeoDB::store()returns the row-group store (Result<Arc<RowGroupStore>>, experimental, the unsupported error on a backend of your own), andLpgStore,LpgStoreSection,PropertyStorage,NodeRecord,EdgeRecord,GraphStoreMut,ExternalTarget,UndoSupport,WriteTargetandgraph_store_mut()are removed: write through sessions or the direct API.GraphStorehas one family of reads, each taking aReadViewand returning aResult(GraphStoreSearchis merged in), and graph algorithms take a store and a view.GrafeoDB::with_storetakes anArc<dyn GraphBackend>.snapshot(),GraphHandle::snapshot(),AsOfView::snapshot()andprojection(name)give a pinnedSnapshot, replacinggraph_store()andselected_graph_store(), and algorithms read through one.iter_nodes()anditer_edges()return aResult. The upgrade guide has before and after tables. - Breaking (Rust and every binding): a read the store cannot do is an error, never an absent answer (#416): the direct reads, counts and reports of
GrafeoDB,SessionandAsOfView(get_node,node_count,info,schema,validateand the rest) return aResult, a direct read of a dropped graph fails, and a store without history answers history reads with the unsupported error. Python raisesGrafeoError, Node.js and WASM throw. C:grafeo_node_countandgrafeo_edge_countwrite to a newsize_t*,grafeo_get_node_labelsandgrafeo_as_of_get_node_propertyto a newchar**, theget_nodeandget_edgecalls returnGRAFEO_OKwith NULL for an absent one, andgrafeo_inforeturns NULL with the error. Go:NodeCount()andEdgeCount()return(int, error)and an absent node or edge isErrNotFound. C#NodeCountandEdgeCountthrow on a failed read andGrafeoGraph.GetNodeandGetEdgereturn null; DartgetNode,getEdgeandgetNodeLabelsreturn null for an absent one. - Breaking (Rust): other API changes:
grafeo::Erroris 32 bytes with boxed payloads (build variants withError::fromorError::type_mismatch);Configand the option and result types are#[non_exhaustive](build them with their constructors andwith_*methods, name fields in patterns with..);drop_graph,create_property_index, the index drops,batch_insert_rdfandcreate_projectionreturnResult(in C the drop and projection calls return -1, the projection calls asint32_t);hybrid_searchandtext_searchtakefilters(passNone);GrafeoDB::wal()andGrafeoDB::file_manager()return the new WAL writer and file manager; andConfig::wal_flush_interval_ms,GrafeoDB::adaptive_config(),admin::DumpMetadataand the Block-STM metrics (block_stm_*, also on grafeo-server's/metrics) are removed. - Rust implementation crates:
QueryProcessor::with_graphandTransactionState::Committingare new,QueryError::semanticandQueryError::unsupportedbuild errors andErrorisClone,Term::from_ntriplesreturnsResult<Term, TermParseError>, the engine'swalfeature enablesgrafeo-file, and the deprecatedTieredStoretrait is removed. - Breaking (bindings): Python
db.algorithms.kcore()returns{"core_numbers": {...}, "max_core": n}(#563); GoDropVectorIndexreturns(bool, error); and the Arrow export (Pythonto_arrow(),nodes_df()and the polars calls, Node.jstoArrowIpc(), the CLI's Arrow dump) keeps lists as lists, maps as structs and durations as structs ofmonths,daysandnanos, where they were text. - Breaking (CLI): standard output holds only results: progress and status lines go to standard error and
--quiethides only those, so-qno longer hides query rows. With--format jsonevery command prints JSON. The commands that only read (info,stats,schema,validate,data dump,index list,index stats,wal status, a query that does not write) open the database read-only, so they no longer migrate a 0.5.x file. - Python: long-running calls release the GIL: queries, commits, algorithms, searches, batch writes, imports, exports, backups, checkpoints and
close()let other threads run, so several threads can query one database. Acommit()orrollback()while another thread runs a query of the same transaction raisesRuntimeError. embed: ONNX Runtime bindings 2.0.0-rc.14: Grafeo builds the process's one ONNX Runtime environment when it loads its first model; an application that builds its own first cannot load Grafeo embedding models in that process.- Dependencies:
rustls-webpki0.103.16 andwebpki-root-certs1.0.10 for RUSTSEC-2026-0382 and RUSTSEC-2026-0383 (reached only by the model download of the opt-inembedfeature),crc32fast1.5.3,unicode-normalization0.1.26, and the Python bindings on PyO3 0.30 (no API change).
Deprecated
All of these are removed in 0.7.0.
- Cargo features that enable nothing:
temporal(history is the retention setting, in every build, and the calls it gated are always there),compact-store(every build that opens files reads a compacted 0.5.x database),temporalandtiered-storageofgrafeo-coreandgrafeo-common, andlpgofgrafeo-core,grafeo-adapters,grafeo-engineandgrafeo-cli(every build has the property graph store; thelpgprofile of thegrafeocrate and the bindings stays). Python'sgrafeo.features()no longer lists them. - Rust: the public fields of
Config: read a setting with its getter and set it with its builder; a field written directly does not count as set, so a database file's stored value wins over it. - Rust:
Session::set_auto_commitandSession::auto_commit(#536): a write outside a transaction always commits on its own; group writes withbegin_transaction. - Single-file and adaptive leftovers:
StorageFormat::SingleFileandWalDirectory, the C, Go and Dartgrafeo_open_single_file,OpenSingleFileandGrafeoDB.openSingleFile(use the plain open), andConfig::adaptive,with_adaptive,without_adaptiveandAdaptiveConfig, which never had an effect. recompact(), which callscompact(), and RustBackupCursor::log_sequence(usewal_lsn).- Rust (
grafeo-core):InvertedIndex::with_tokenizer(usewith_optionswith aTokenizerKind), and the per-transaction methods ofRdfStore(insert_in_transaction,commit_transactionand the rest): run updates in a session transaction.
Fixed
- A commit whose WAL write fails is no longer reported as committed (#498): it is rolled back and fails with the retryable
GRAFEO-T009, or withGRAFEO-T010(outcome unknown) when the write landed but could not be synced. Before, it was logged as a warning and lost on the next restart. - Recovery stops at damage in the WAL (#425): an open that finds damage before the end of the log fails with
GRAFEO-S002, naming the file and offset, and changes nothing, where 0.5.x skipped past it and built a state that never existed. A torn tail is still cut.Config::with_wal_salvage()(Pythonwal_salvage=True, Node.jswalSalvage: true) replays the commits before the damage and keeps the rest in<file>.wal.damaged. - Commits that were lost on a crash or reopen: a write after
close()now fails withGRAFEO-T007(PythonDatabaseClosedError) instead of being accepted and lost; a read-only open replays what a crashed writer left in the WAL (a build withoutwalrefuses such a file); an open with the WAL turned off no longer drops a leftover WAL, and a new database no longer replays one from an earlier database at its path; imports and RDF batch inserts are durable once they return; SPARQLCOPY,MOVE,ADDandCLEAR ALLreplay as written; and indexes (#401), schema details (defaults, parent types, edge endpoints, KEY labels, ALTER additions) and graph drops survive a crash. - Files and backups: databases larger than 4 GiB work (#392) (0.5.42 and older wrote them corrupt); ids of deleted nodes and edges are never given out again after a reopen; epochs continue after a reopen and after the migration; timestamps keep their sub-millisecond part and counter values survive a checkpoint; a damaged file is refused instead of aborting the process; incremental backups work across a restart (#267); backups of a read-only database hold the state it shows and a restore replays every incremental backup after its full one (#362);
grafeo backup restore --forcereplaces the target only once the restore is complete;open_in_memory()no longer opens its source read-write; and the same data exports to the same snapshot bytes. - Data that 0.5.x silently dropped: encryption at rest did nothing, and now encrypts the file and its WAL (an open without the right key fails; encryption with a spill path,
TierOverride::ForceDiskor no path fails, and a migrated database's.pre-0.6copy stays unencrypted); spilled vector embeddings were not in the database file (#594) (see Spilled embeddings); and a build withouttriple-store,vector-indexortext-indexopened a database without that data and dropped it at the next checkpoint, and now refuses it (#544). - 0.5.x's compacted store is gone, with its bugs (#542, #558, #596): writes after
compact()are no longer lost, ids stay unique and every read sees the whole database. A node with several labels in a compacted file matches each of them again (#595). Whatcompact()of 0.5.40 to 0.5.44 lost stays lost (nodes without labels, indexes, typed lists and maps, deleted items that come back): see Compact Store. - Rust:
GrafeoDB::opencompiles with the default features (#379); withoutwal, commits reach the file at a checkpoint. - Snapshot isolation holds on every read path (#412): other sessions and direct reads no longer see an open transaction's values, labels or deletes, a transaction reads one state throughout (filters, index lookups, label scans, searches), and checkpoints,
close(),save(), backups,to_memory()andexport_snapshot()write the committed state while a transaction is open. Graph algorithms and the Python reads (get_nodes_by_label,as_networkx()) see committed data only, and a write during a commit no longer lands in the middle of it (#548). - Constraints and transactions: a
UNIQUE,PRIMARY KEYorNODE KEYvalue holds between concurrent transactions (the second writer getsGRAFEO-T001), and a transaction may set such a key to the value its own node holds. An edge to a node deleted in the same statement or concurrently is refused. A refused schema statement, a failed stored procedure that writes, and a SPARQL or GraphQL update that fails part way (#414) change nothing; a stored procedure that writes is refused where writes are. Labels set on a node created in the same transaction are kept, a rollback to a savepoint restores labels, a rollback no longer deadlocks with a delete, read-only databases refuse SPARQL updates, imports and snapshot restores, Pythonimport_dfand WASMimportRowsandimportLpgimport all or nothing, andgc()collects every graph. - A GQL
DELETEof a variable nothing binds deleted every node:DETACH DELETE nwithout aMATCHnow fails with "Undefined variable 'n'". A plainDELETEof a node with incoming edges in a database without backward edges now fails in release builds too. - Clauses after a write read the whole write (#455): a
RETURN,WITH,WHERE, aggregate,MATCH,OPTIONAL MATCH,MERGEor subquery after a write in the same statement read only what earlier rows wrote; they now read after the whole write, as ISO GQL and openCypher define a statement. ALIMITorFINISHno longer cuts the write short, a write takes values from nodes created earlier in the statement,FOREACHand unitCALLsubqueries keep the number of rows, and a statement that ends with a write returns no rows and no columns (#580). - WHERE, OPTIONAL MATCH and subquery scope (#455, #545): each condition is checked where every value it reads is bound; the
WHEREof anOPTIONAL MATCHis part of its pattern, so every row stays (filter withWITH * WHEREor GQLFILTER, which now filters every row); a later comma-separatedMATCHpart goes on from a variable bound before it; a vector or text search after aMATCHkeeps its rows;CALLsubqueries keep their imported variables after aWITH; anUNWINDafterWITH ... WHEREunwinds the rows kept; a condition without variables (WHERE $p = 1) no longer fails with "Empty plan"; and an index lookup at a past epoch no longer matches the values of now. - GQL statements in any order the standard allows (#483):
ORDER BY,OFFSETandLIMITbefore the finalRETURN,WHEREandFILTERbetweenMATCHstatements, writes afterWITHand after each other,LETandFILTERfirst, and a finalCALLthat writes. Also fixed:NEXTafter a write,SELECT ... FROM g,HAVINGright afterGROUP BY, backticked names inSETandREMOVE(they kept their backticks), doubled quotes in strings,collect_list,HOME_SCHEMAandHOME_GRAPH, andSESSION RESETto the session's home. - MERGE follows openCypher: a pattern is matched or created as a whole, a node the pattern does not connect is not reused, an anonymous node merges,
ON CREATE SET n:Labeladds the label, CypherSET n = {...}replaces the properties, and Cypher and GQLMERGEand CypherCREATEstored a left-pointing relationship backwards (find and reverse such relationships 0.5.x wrote). - Cypher follows openCypher:
<-[:T]->and<-->match either direction, a relationship without a type or a direction cannot be created,INandSTARTS WITHbind tighter than comparisons, a relationship is matched at most once perMATCH, chained comparisons (a < b <= c) work,exists((n)-->())tests the pattern, pattern comprehensions read the row,:A|:Bparses, a clause afterRETURNis an error, aCALLafter other clauses runs per row, an inlineWHEREon a variable-length relationship holds per edge, andCREATE CONSTRAINTandCREATE INDEXwork without a name and takeUSING TEXT,VECTORorBTREE(#344). - Paths (#590, #591, #572, #318): a path variable holds every node and edge of a multi-edge pattern;
DIFFERENT EDGESworks andTRAIL,ACYCLICandSIMPLEhold for the whole path; shortest-path searches bind their path and edge variables and apply the edge's conditions;MATCH ANYkeeps a path per pair of endpoints andSHORTEST kkeeps k; path modes after the path variable parse; aWHEREon a quantified edge holds per edge; horizontal aggregates (sum(e.w)over-[e]->{1,3}) work; andlength(p)reads a passed-on path. - Variable-length patterns end and stay in memory: a pattern on a graph with cycles could abort the process allocating tens of GB; rows now stream, and a search that would exceed a quarter of
memory_limitfails with advice. A path of 100,000 edges no longer overflows the stack, unbounded patterns no longer stop aftermin + 100hops, SPARQL+and*no longer stop after 50, and an undirected pattern takes a self-loop once.-[:A:B]->and a created edge with:A|Bare errors. - Very large statements run (#573): an
ANDorORof 10,000 conditions, anINSERTof 10,000 patterns or aUNIONof 10,000 queries overflowed the stack, aborting native builds and breaking the WASM module for the rest of the page; they now run in every query language. - Aggregates and grouping (#589, #602): values beside an aggregate with a computed key no longer turn into
0; a spilled group keeps aggregating; aggregates skip nulls; grouping andDISTINCTtreat3and3.0as one value and keep float keys as floats;minandmaxorder mixed types asORDER BYdoes;DISTINCTreaches the statistical aggregates; two-argument aggregates read their second argument;listaggandgroup_concattake their separator;HAVINGcomputes its own aggregates;RETURN count(*)withoutMATCHworks; and an aggregate in aWHERE, a wrong number of arguments or an item that mixes an aggregate with a non-key is an error, as are theGROUP BYmistakes, each with its reason. - ORDER BY: GQL and Cypher
ORDER BYread what openCypher's does (the input of a plainWITH, the columns of an aggregating one), the GQLORDER BYstatement also puts nulls last, and withDISTINCTonly returned values can be sorted on. - Values keep what they are: nodes and edges inside lists, maps and paths stay nodes and edges,
startNode(r)andendNode(r)return nodes, list and map literals keep a missing value as null, a property named_id,_labelsor the like no longer replaces the identity (#254), a list, map or bytes parameter returned as is no longer comes back as''(#574), a variable named like an internal one keeps its value,UNWINDkeeps its list variable,size()counts characters, andid,elementIdandpropertiesread any expression. - Functions (#570, #179): an unknown function or a wrong number of arguments fails before any row is read, also in
EXPLAIN, with the closest name as a hint, where it was null (includingtoStringOrNull,isEmpty,randomUUIDand other names Grafeo lacks);path_length(p)works; an invalid regular expression, a build without regex ortext-indexsupport andcreate_vector_indexwithoutvector-indexare errors; the clock functions read one instant per statement;rand()gives a new value per row, also in WASM; andnormalize,LIKEacross line breaks,cosine_distanceof equal and opposite vectors,absof the smallest integer (22003) and unary+and-(a type error for non-numbers) are fixed. - Temporal values (#584): zoned datetimes order by their instant and compare with timestamps;
date,timeanddatetimetake a zoned datetime;toStringof a local datetime has no zone; zoned datetime arithmetic keeps the offset; a duration multiplies and divides by any number; GQL compares zoned and local values at the session time zone; Cypherdatetime()andtime()are zoned and keep their offset, anddatetime({epochMillis: n})and temporal components work. - Comparisons and typed properties (#535, #568):
=returns the same rows with or without a property index; a node or edge no longer equals its id;IS TYPEDchecks every type of type DDL; aFLOAT64property takes integers; adding a label converts values to its types; an integer past 64 bits is an exact DECIMAL in imports, parameters and every binding; and type errors name types as DDL spells them. - Schema and DDL (#567, #423): a closed graph type refuses what it does not declare; types created in a schema check writes there; defaults may be negative, a default of the wrong type is refused, and graph type and edge type defaults apply;
DROP GRAPH TYPErefuses a type in use, and a graph type created under a dropped one's name no longer takes over its graphs; a graph type in braces declares its element types;MAPproperties take maps; property names likestartsandmatchcan be declared;CREATE GRAPH dst AS COPY OF srccopies the graph;SHOW INDEXESkeeps every row of a multi-property index after a reopen; refused writes reportG2000orG1001; andSHOWandEXPLAINof a write run in a read-only database or transaction. - Parameters, procedures and PROFILE: SPARQL parameters bind their variables; parameters beside an aggregate, in
HAVINGand in the second argument of a binary aggregate are filled in; a streamed statement with a missing parameter fails asexecutedoes; the plan cache keys a statement by its exact text;CALLarguments take parameters and expressions; stored procedure arguments are bound as values; a query past its timeout is the retryableGRAFEO-Q003in every plan; andPROFILEof a query that starts withoutMATCHno longer panics. - SQL/PGQ:
CREATE PROPERTY GRAPHcreates the types and graph it names; aggregates work insideSELECTandHAVINGexpressions;GRAPH_TABLEcolumns read through the table alias; property maps apply to every element;LIMITandOFFSETapply after grouping;-[:T*]->is one or more hops;HAVINGon a grouping column andRELATIONSHIPS(p)work; an aggregate inCOLUMNSis an error that says to aggregate in theSELECT; and the SQL/PGQ-only build compiles. - SPARQL terms and operators (#464):
DELETEremoves the stored term and templates write the bound one, literals of unknown datatypes keep them, operators andORDER BYfollow SPARQL 1.1, language tags survive expressions,ROUND, double division, date casts andisNumericfollow XPath, an IRI holds no space, and non-ASCII literals survive a reopen. - SPARQL queries:
GROUP BY (expr AS ?v),ORDER BYof any pattern variable, aggregates insideHAVING(GROUP_CONCATincluded),SELECTexpressions over aggregates,SUMandAVGof no values (0), emptyVALUES, unbound selected variables,MOVEandCOPYof a graph onto itself, andCLEAR NAMED(which cleared the default graph too). An empty named graph no longer takes 1.3 MB,execute_sparqlreports updates to change data capture, and sessions run SPARQL and GraphQLPROFILE. - Vector and text search (#593, #600, #391, #619): a query vector of the wrong size or with NaN fails with
GRAFEO-V001instead of crashing the process, and an indexed vector property refuses NaN; removing a vector, a full neighbor list or many identical vectors no longer leave others unfindable; equal scores rank by node id, so identical searches give identical results, also after a reopen; andmemory_usage()counts named graphs, indexes and what values hold. - Graph algorithms (#592): results come in node-id order and are bit-identical across runs, platforms and thread counts; algorithms no longer read uncommitted writes (betweenness centrality crashed);
CALL grafeo.dfsreports tree depth withdiscoveryandfinishcolumns; articulation points take linear time; and Pythonas_networkx(),as_solvor(),get_nodes_by_labelandget_property_batchfollowset_graph(). - Databases on a store of your own (
with_store,with_read_store): sessions are set up like any other, what only the built-in store has (indexes, searches, snapshots,to_memory()) is the unsupported error instead of a panic,Sessionreads read that store,validate()reports instead of panicking, and a label outside a projection's spec is found. - Imports: CSV and JSON Lines imports keep every column and key (spaces, punctuation, a byte order mark, late keys), and
import_jsonlworks in the Python and Node.js packages.grafeo data loadconnects edges to the nodes the file names, keeps plain values and runs in one transaction (#537). - CLI: JSON and CSV results keep their values and types, an error prints its cause,
grafeo index listshows the index's name, andgrafeo query --lang cypherwith--paramruns Cypher. - Bindings: Python
bytes, aware times and dates round-trip,nodes_df()gives the same values with pyarrow, and the polars exports work on polars 2.0. Node.js and WASM convert parameters and rows as properties do,ResultStream.next()has a valid type, WASM timings and clock functions work, andexecuteRawWithLanguageruns in the open transaction (#574). C fails on invalid params JSON, the C# NuGet package bundles every query language (#636), C# and Dart integer types arrive as integers, DartcurrentSchema()no longer crashes, and Gremlin nestedand(),or()andnot()filters apply.changes_betweenreturns a commit's events in write order.
Result changes
- Numbers: float
=and<>are exact (IEEE 754) and an integer equals only a float of exactly its value,<and>compare integers with floats exactly, and a float literal past the float range is an error (22003 in GQL, a syntax error in Cypher). Use decimals for exact fractions. - LIMIT, SKIP, OFFSET and WITH: a negative count is 22G02 and a non-integer 22G03, written or as a parameter; a
WITHwith two items of one name is an error (#371). - CAST, SUM and AVG: CAST trims spaces around a text and converts booleans and numbers into each other, in GQL and SQL/PGQ (Cypher keeps openCypher's rules);
sumandavgtake numbers or durations only (strings were summed), and durations now sum and average. text_matchandtext_scoreneed a text index (#308): on a property without one the query fails, naming theCREATE INDEXto run, where every node scored 0.- GQLSTATUS names the kind of error: an unresolved name stays
42002, any other rule a statement breaks is42000, and an unsupported feature hasGRAFEO-Q004. - SQL/PGQ
GRAPH_TABLE (g MATCH ...)reads graph g, where it read the session's graph; the form without a comma is accepted. - Graph algorithms (#563, #564, #566, #592): k-core returns core numbers; Louvain merges communities level by level (a 1,000-node path: 500 pairs at modularity 0.50 before, 31 communities at 0.94 now);
as_networkx(directed=False).pagerank()is undirected;db.algorithmsandcreate_projectionfollow the selected graph; clustering coefficients and stochastic block partition no longer change between calls; clustering, triangle counts and k-truss ignore self-loops; and strongly connected components are numbered in another order. - SPARQL:
COUNTin a transaction counts its own writes,DROP ALLdrops every graph, andASKreturns one row with a Boolean in the columnboolean.
What's Changed
- Fix/548 commit completes atomically by @StevenBtw in #550
- Fix/542 compact missing properties by @StevenBtw in #553
- Update README.md by @StevenBtw in #554
- deps(rust): bump the rust-dependencies group with 4 updates by @dependabot[bot] in #559
- deps(rust): bump cmov from 0.5.3 to 0.5.4 by @dependabot[bot] in #560
- Bump the uv group across 1 directory with 2 updates by @dependabot[bot] in #561
- Bump the npm_and_yarn group across 2 directories with 1 update by @dependabot[bot] in #562
- Release/0.6.0 by @StevenBtw in #552
- Release 0.6.0 by @StevenBtw in #597
- Release 0.6.0-beta.1 by @StevenBtw in #598
- Update README.md by @StevenBtw in #618
- Update README.md by @StevenBtw in #620
- Release/0.6.0 by @StevenBtw in #622
- Update README.md by @StevenBtw in #623
- Release/0.6.0 by @StevenBtw in #625
- test(node): compare binding versions with the package version by @temporaryfix in #627
- deps(actions): bump crate-ci/typos from 1.50.3 to 1.51.1 by @dependabot[bot] in #629
- deps(rust): bump the rust-dependencies group with 4 updates by @dependabot[bot] in #630
- Feat/402 node edges by @StevenBtw in #632
- Feat/540 builtin functions by @StevenBtw in #633
- Revert "Feat/540 builtin functions" by @StevenBtw in #634
- Feat/540 builtin functions by @StevenBtw in #635
- Label predicates in WHERE scan their labels (#457) by @StevenBtw in #637
- deps(rust): bump the rust-dependencies group with 9 updates by @dependabot[bot] in #641
- deps(actions): bump crate-ci/typos from 1.50.3 to 1.51.1 by @dependabot[bot] in #640
- perf(storage): read cold scalar columns in place by @temporaryfix in #644
- fix: group precise decimal scale aliases together by @temporaryfix in #646
- Gremlin: anonymous traversals (__.) by @jakeboone02 in #631
- fix: compile facade feature profiles without the LPG store by @temporaryfix in #650
- Backmerge by @StevenBtw in #652
- Release/0.6.0 by @StevenBtw in #626
- History/0.6.0 by @StevenBtw in #658
- Release/0.6.0 by @StevenBtw in #657
Full Changelog: v0.5.44...v0.6.0