2.12 GA (v2.12.3)
This is the General Availability release of RedisGraph 2.12
2.12 will be the last major release of RedisGraph. We do not plan to release new features, but we will continue to release patches until January 31, 2025. You can read more about the end of life of RedisGraph here.
Headlines:
RedisGraph 2.12 introduces constraints, observability, new clauses, constructs, and functions, performance improvements, and bug fixes.
What's new in 2.12
- Constraints can be enforced
- A
UNIQUE
constraint enforces the uniqueness of values of a given set of attributes for all nodes with a given label or for all edges with a given relationship-type. - A
MANDATORY
constraint enforces the existence of given attributes for all nodes with a given label or for all edges with a given relationship-type. - Introduce
GRAPH.CONSTRAINT CREATE
andGRAPH.CONSTRAINT DROP
commands, as well asdb.constraints()
procedure to list all graph constraints
- A
- Observability
- Introduce
GRAPH.INFO
command to retrieve information about currently running and waiting queries (GRAPH.INFO RunningQueries WaitingQueries
) - Information about terminated queries can be retrieve from a stream named
telemetry{graph_name}
(e.g., usingXREVRANGE telemetry{graph_name} + -
)
- Introduce
- Clauses and constructs
- Introduce
CALL {...}
clause (call subquery) - Introduce
FOREACH
clause: feed the elements of a list to a sub-query comprised of updating clauses - Introduce support for all-properties selector to map projection (
.*
)
- Introduce
- Functions
- Introduce a new type-reflection function
typeOf(expr)
- given a literal, an expression, an alias, a node's or a relationship's property - return its type:Map
,String
,Integer
,Boolean
,Float
,Node
,Edge
,List
,Path
,Point
, orNull
- Introduce new list functions
list.dedup(list)
- return a similar list after removing duplicate elementslist.insert(list, idx, val[, dups = TRUE])
- return a list after inserting a given value at a given indexlist.insertListElements(list, list2, idx[, dups = TRUE])
- return a list after inserting the elements of a second list at a given indexlist.remove(list, idx[, count = 1])
- return a list after removing a given number of consecutive elements, starting at a given indexlist.sort(list[, ascending = TRUE])
- return a list with similar elements, but sorted
- Introduce new string functions
string.join(strList[, delimiter = ''])
- return a concatenation of a list of strings using a given delimiterstring.matchRegEx(str, regex)
- given a string and a regular expression - return a list of all matches and matching regionsstring.replaceRegEx(str, regex, replacement)
- given a string and a regular expression - return a string after replacing each regex match with a given replacement
- All string functions (old and new) are now Unicode (UTF-8) compatible
- Introduce a new type-reflection function
CREATE INDEX
is now handled in the background
Details
Bug fixes (since 2.12-M01):
- #3104
RETURN *
errors if only a path variable is in scope - #2341 Path variable is missing from
RETURN *
output - #2223
WITH *
erases path variables
Notes:
- The version inside Redis will be 2.12.3 in semantic versioning. Since the version of a module in Redis is numeric, we could not add a GA flag.
- Minimal Redis version: 6.2