From ea02a1ea7e6a14050067d0a79dbf7cd5f518d2fc Mon Sep 17 00:00:00 2001 From: DavIvek Date: Fri, 5 Jun 2026 15:16:37 +0200 Subject: [PATCH 1/3] MemGQL v0.7 docs: typed projections, liveness queries, NUMERIC + ORDER BY alias Catch the memgql docs up to PRs #24, #29, #30: - changelog: new v0.7.0 section (typed RETURN p / RETURN r, connection-less RETURN 1 liveness, ORDER BY by RETURN alias, delimited identifiers, Postgres NUMERIC fix) - reference: add whole-node/whole-relationship + liveness matrix rows; drop the now-false 'RETURN n returns column values' limitation - connect/{postgres,mysql,duckdb}: add whole-node/whole-relationship matrix row; drop the stale RETURN n limitation --- pages/memgraph-zero/memgql/changelog.mdx | 27 +++++++++++++++++++ pages/memgraph-zero/memgql/connect/duckdb.mdx | 2 +- pages/memgraph-zero/memgql/connect/mysql.mdx | 2 +- .../memgraph-zero/memgql/connect/postgres.mdx | 2 +- pages/memgraph-zero/memgql/reference.mdx | 5 ++-- 5 files changed, 32 insertions(+), 6 deletions(-) diff --git a/pages/memgraph-zero/memgql/changelog.mdx b/pages/memgraph-zero/memgql/changelog.mdx index 60dba10ff..39af02f41 100644 --- a/pages/memgraph-zero/memgql/changelog.mdx +++ b/pages/memgraph-zero/memgql/changelog.mdx @@ -5,6 +5,33 @@ description: MemGQL release notes # MemGQL Changelog +## MemGQL v0.7.0 - TBD + +### ✨ New features & Improvements + +- **Typed projections on SQL backends.** `RETURN p` now returns a structured + Bolt **Node** and `RETURN r` a typed Bolt **Relationship** on PostgreSQL, + MySQL and DuckDB — previously these backends returned the underlying column + values and a map projection (`RETURN p {.id, .name}`) was required. Nodes + carry their label and mapped properties; relationships carry their type and + mapped properties. Mixing scalar and whole-element projections in one + `RETURN` (`RETURN p.name, p`) works too. +- **Connection-less queries (liveness check).** `RETURN 1`, `RETURN 1 + 2 AS x` + and `WITH 1 AS x RETURN x` now evaluate locally with no connector configured + and no backend reachable — useful as a Bolt-level health probe. +- **`ORDER BY` by `RETURN` alias in cross-backend queries.** A sort key can + reference a projected alias (`RETURN fact.tx_count AS tx_count … ORDER BY + tx_count`), including when the alias is nested inside an arithmetic + expression (`ORDER BY tx_count + 1`). The post-join sort rewrites the alias + back to its underlying expression. +- **Delimited (quoted) identifiers** in GQL queries now parse. + +### 🐞 Bug fixes + +- **PostgreSQL `NUMERIC` columns** now deserialize correctly — whole and + fractional values arrive at the Bolt driver as Float and `NULL` is + preserved. Previously `NUMERIC`-typed columns were unsupported. + ## MemGQL v0.6.1 - May 31st, 2026 ### ✨ New features & Improvements diff --git a/pages/memgraph-zero/memgql/connect/duckdb.mdx b/pages/memgraph-zero/memgql/connect/duckdb.mdx index b4a506b9b..cf23b4b2d 100644 --- a/pages/memgraph-zero/memgql/connect/duckdb.mdx +++ b/pages/memgraph-zero/memgql/connect/duckdb.mdx @@ -91,6 +91,7 @@ For environment variables, see [Reference](../reference.mdx#duckdb-duckdb). | Untyped edge `()-[]->(b)` | ✗ | | `UNION` / `UNION ALL` / `UNION DISTINCT` | ✓ | | Quantified path `(){m,n}` — bounded | ✓ | +| Whole-node `RETURN n` / whole-rel `RETURN r` | ✓ | | Map projections `RETURN n {.a, .b}` | ✓ | | `IN` list membership `WHERE x IN [...]` | ✓ | | `STARTS WITH` / `ENDS WITH` / `CONTAINS` | ✓ | @@ -113,4 +114,3 @@ For environment variables, see [Reference](../reference.mdx#duckdb-duckdb). - **Unbounded variable-length paths** (`()-[*]->()`) are rejected. Bound the depth (`{1,5}`) or run the query against a Cypher backend. - **`FOR x IN [...]` (UNWIND-style)** is rejected with an actionable error. Cypher backends (Memgraph, Neo4j) handle this syntax natively. - **Path variables on variable-length patterns** — `MATCH p = (a){1,3}(b) RETURN p` is not supported. Drop the `p =` binding (or query a Cypher backend) and `RETURN` the individual nodes / edges instead. -- **`RETURN n`** returns the node's column values rather than a single structured node object. For a structured result, use a map projection: `RETURN n {.id, .name} AS info`. diff --git a/pages/memgraph-zero/memgql/connect/mysql.mdx b/pages/memgraph-zero/memgql/connect/mysql.mdx index 368c56793..f232dc115 100644 --- a/pages/memgraph-zero/memgql/connect/mysql.mdx +++ b/pages/memgraph-zero/memgql/connect/mysql.mdx @@ -122,6 +122,7 @@ For environment variables, see [Reference](../reference.mdx#mysql-mysql). | Untyped edge `()-[]->(b)` | ✗ | | `UNION` / `UNION ALL` / `UNION DISTINCT` | ✓ | | Quantified path `(){m,n}` — bounded | ✓ | +| Whole-node `RETURN n` / whole-rel `RETURN r` | ✓ | | Map projections `RETURN n {.a, .b}` | ✓ | | `IN` list membership `WHERE x IN [...]` | ✓ | | `STARTS WITH` / `ENDS WITH` / `CONTAINS` | ✓ | @@ -144,4 +145,3 @@ For environment variables, see [Reference](../reference.mdx#mysql-mysql). - **Unbounded variable-length paths** (`()-[*]->()`) are rejected. Bound the depth (`{1,5}`) or run the query against a Cypher backend. - **`FOR x IN [...]` (UNWIND-style)** is rejected with an actionable error. Cypher backends (Memgraph, Neo4j) handle this syntax natively. - **Path variables on variable-length patterns** — `MATCH p = (a){1,3}(b) RETURN p` is not supported. Drop the `p =` binding (or query a Cypher backend) and `RETURN` the individual nodes / edges instead. -- **`RETURN n`** returns the node's column values rather than a single structured node object. For a structured result, use a map projection: `RETURN n {.id, .name} AS info`. diff --git a/pages/memgraph-zero/memgql/connect/postgres.mdx b/pages/memgraph-zero/memgql/connect/postgres.mdx index 5022295dd..8af24ef37 100644 --- a/pages/memgraph-zero/memgql/connect/postgres.mdx +++ b/pages/memgraph-zero/memgql/connect/postgres.mdx @@ -106,6 +106,7 @@ For environment variables, see [Reference](../reference.mdx#postgresql-postgres) | Untyped edge `()-[]->(b)` | ✗ | | `UNION` / `UNION ALL` / `UNION DISTINCT` | ✓ | | Quantified path `(){m,n}` — bounded | ✓ | +| Whole-node `RETURN n` / whole-rel `RETURN r` | ✓ | | Map projections `RETURN n {.a, .b}` | ✓ | | `IN` list membership `WHERE x IN [...]` | ✓ | | `STARTS WITH` / `ENDS WITH` / `CONTAINS` | ✓ | @@ -128,4 +129,3 @@ For environment variables, see [Reference](../reference.mdx#postgresql-postgres) - **Unbounded variable-length paths** (`()-[*]->()`) are rejected. Bound the depth (`{1,5}`) or run the query against a Cypher backend. - **`FOR x IN [...]` (UNWIND-style)** is rejected with an actionable error. Cypher backends (Memgraph, Neo4j) handle this syntax natively. - **Path variables on variable-length patterns** — `MATCH p = (a){1,3}(b) RETURN p` is not supported. Drop the `p =` binding (or query a Cypher backend) and `RETURN` the individual nodes / edges instead. -- **`RETURN n`** returns the node's column values rather than a single structured node object. For a structured result, use a map projection: `RETURN n {.id, .name} AS info`. diff --git a/pages/memgraph-zero/memgql/reference.mdx b/pages/memgraph-zero/memgql/reference.mdx index 6529a8818..8dbd553a4 100644 --- a/pages/memgraph-zero/memgql/reference.mdx +++ b/pages/memgraph-zero/memgql/reference.mdx @@ -30,7 +30,9 @@ supports. | Quantified path `(){m,n}` — bounded | ✓ | ✓ | | Quantified path `(){m,}` — unbounded | ✓ | ✗ | | Shortest-path (`ALL SHORTEST` / `ANY SHORTEST` / `SHORTEST k`) | ✓ | ✗ | ✗ | +| Whole-node `RETURN n` / whole-relationship `RETURN r` | ✓ | ✓ | | Map projections `RETURN n {.id, .title}` | ✓ | ✓ | +| Connection-less `RETURN 1` / `RETURN 1 + 2` (liveness) | ✓ | ✓ | | `IN` list membership `WHERE x IN […]` | ✓ | ✓ | | `STARTS WITH` / `ENDS WITH` / `CONTAINS` | ✓ | ✓ | | `collect()` / `collect_list()` (aggregate) | ✓ | ✓ | @@ -61,9 +63,6 @@ supports. `MATCH p = (a){1,3}(b) RETURN p` is not yet supported on SQL backends. Drop the `p =` binding (or query a Cypher backend) and `RETURN` the individual nodes / edges instead. -- **`RETURN n` on SQL backends returns the node's column values** rather - than a single structured node object. For a structured result, use a - map projection: `RETURN n {.id, .name} AS info`. ## Graph Management Query Syntax From 61724de0679b17f3aba9f413c3e01f0cee11f02f Mon Sep 17 00:00:00 2001 From: DavIvek Date: Fri, 5 Jun 2026 15:24:11 +0200 Subject: [PATCH 2/3] MemGQL changelog: typed projections cover every SQL backend, not just PG/MySQL/DuckDB apply_descriptors is wired into all seven SQL connectors (incl. ClickHouse, Iceberg, Pinot, Oracle); match the PR title's 'on every SQL backend'. --- pages/memgraph-zero/memgql/changelog.mdx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pages/memgraph-zero/memgql/changelog.mdx b/pages/memgraph-zero/memgql/changelog.mdx index 39af02f41..8d7a0bdc5 100644 --- a/pages/memgraph-zero/memgql/changelog.mdx +++ b/pages/memgraph-zero/memgql/changelog.mdx @@ -9,13 +9,14 @@ description: MemGQL release notes ### ✨ New features & Improvements -- **Typed projections on SQL backends.** `RETURN p` now returns a structured - Bolt **Node** and `RETURN r` a typed Bolt **Relationship** on PostgreSQL, - MySQL and DuckDB — previously these backends returned the underlying column - values and a map projection (`RETURN p {.id, .name}`) was required. Nodes - carry their label and mapped properties; relationships carry their type and - mapped properties. Mixing scalar and whole-element projections in one - `RETURN` (`RETURN p.name, p`) works too. +- **Typed projections on every SQL backend.** `RETURN p` now returns a + structured Bolt **Node** and `RETURN r` a typed Bolt **Relationship** on + every SQL connector (PostgreSQL, MySQL, DuckDB, ClickHouse, Iceberg, Pinot, + Oracle) — previously SQL backends returned the underlying column values and a + map projection (`RETURN p {.id, .name}`) was required. Nodes carry their + label and mapped properties; relationships carry their type and mapped + properties. Mixing scalar and whole-element projections in one `RETURN` + (`RETURN p.name, p`) works too. - **Connection-less queries (liveness check).** `RETURN 1`, `RETURN 1 + 2 AS x` and `WITH 1 AS x RETURN x` now evaluate locally with no connector configured and no backend reachable — useful as a Bolt-level health probe. From bb17a856c684f7460b893b543261aaca8488b146 Mon Sep 17 00:00:00 2001 From: DavIvek Date: Fri, 5 Jun 2026 15:28:37 +0200 Subject: [PATCH 3/3] MemGQL docs: add whole-node / whole-rel RETURN row to ClickHouse, Iceberg, Pinot pages Typed projections (PR #29) work on every SQL connector; surface it in the feature table of the narrower-verified connector pages too. --- pages/memgraph-zero/memgql/connect/clickhouse.mdx | 1 + pages/memgraph-zero/memgql/connect/iceberg.mdx | 1 + pages/memgraph-zero/memgql/connect/pinot.mdx | 1 + 3 files changed, 3 insertions(+) diff --git a/pages/memgraph-zero/memgql/connect/clickhouse.mdx b/pages/memgraph-zero/memgql/connect/clickhouse.mdx index b90c49d1e..55f79bc29 100644 --- a/pages/memgraph-zero/memgql/connect/clickhouse.mdx +++ b/pages/memgraph-zero/memgql/connect/clickhouse.mdx @@ -102,6 +102,7 @@ For environment variables, see [Reference](../reference.mdx#clickhouse-clickhous | Feature | ClickHouse | |-----------------------------------------------|------------| | `MATCH (n:Label) RETURN n.prop` | ✓ | +| Whole-node `RETURN n` / whole-rel `RETURN r` | ✓ | | Pattern-level `WHERE` (`MATCH (n WHERE …)`) | ✓ | | Typed edge `(a)-[r:R]->(b)` | ✓ | | `ORDER BY` / `LIMIT` | ✓ | diff --git a/pages/memgraph-zero/memgql/connect/iceberg.mdx b/pages/memgraph-zero/memgql/connect/iceberg.mdx index 23b8ad267..70b837924 100644 --- a/pages/memgraph-zero/memgql/connect/iceberg.mdx +++ b/pages/memgraph-zero/memgql/connect/iceberg.mdx @@ -100,6 +100,7 @@ For environment variables, see [Reference](../reference.mdx#iceberg-iceberg). | Feature | Iceberg / Trino | |-----------------------------------------------|-----------------| | `MATCH (n:Label) RETURN n.prop` | ✓ | +| Whole-node `RETURN n` / whole-rel `RETURN r` | ✓ | | Pattern-level `WHERE` (`MATCH (n WHERE …)`) | ✓ | | Typed edge `(a)-[r:R]->(b)` | ✓ | | `ORDER BY` / `LIMIT` | ✓ | diff --git a/pages/memgraph-zero/memgql/connect/pinot.mdx b/pages/memgraph-zero/memgql/connect/pinot.mdx index c1415dc8c..0a78e9988 100644 --- a/pages/memgraph-zero/memgql/connect/pinot.mdx +++ b/pages/memgraph-zero/memgql/connect/pinot.mdx @@ -100,5 +100,6 @@ For environment variables, see [Reference](../reference.mdx#apache-pinot-pinot). | Feature | Pinot | |-----------------------------------------------|-------| | `MATCH (n:Label) RETURN n.prop` | ✓ | +| Whole-node `RETURN n` / whole-rel `RETURN r` | ✓ | | Pattern-level `WHERE` (`MATCH (n WHERE …)`) | ✓ | | Typed edge `(a)-[r:R]->(b)` | ✓ |