FalkorDB::Graph
Constructors
Instance methods
cache
Sourceconstraints
Sourcedelete!
Sourceindices
Sourcekey
Sourcelist
Sourcemulti
Execute a transaction within the given graph
graph.multi do |txn|
txn.write_query <<-CYPHER, team_id: 123
MATCH (
CYPHER
end
Query the graph with the given Cypher query, passing in the given
params, and returning the given types corresponding to the values in
your Cypher RETURN clause.
graph.read_query <<-CYPHER, {team_id: 123}, return: {Person}
MATCH (team:Team{id: $team_id})
MATCH (person)-[:MEMBER_OF]->(team)
RETURN person
CYPHER
read_query(cypher : String)
Query the graph with the given Cypher query.
graph.read_query <<-CYPHER
MATCH (person:Person)
RETURN person
CYPHER
read_query(cypher : String, **params)
Query the graph with the given Cypher query, passing in the given params.
graph.read_query <<-CYPHER, team_id: 123
MATCH (team:Team{id: $team_id})
MATCH (person)-[membership:MEMBER_OF]->(team)
RETURN person, membership, team
CYPHER
redis
Sourceslowlog
SourceWrite data to the graph using the given cypher query, passing in the
given params and returning the given types for the values in your
query's RETURN clause.
graph.write_query <<-CYPHER, {id: 123, now: Time.utc.to_unix_ms}, return: {Person}
MATCH (person:Person{id: $id})
SET person.confirmed_at = $now
RETURN person
CYPHER
write_query(cypher : String)
Write data to this graph using the given Cypher query.
graph.write_query "MATCH (u:User{active: true}) SET u:ActiveUser, u.active = null"
Write data to the graph using the given cypher query, passing in the
given params and returning the given types for the values in your
query's RETURN clause.
graph.write_query <<-CYPHER, {id: 123, now: Time.utc.to_unix_ms}, return: {Person}
MATCH (person:Person{id: $id})
SET person.confirmed_at = $now
RETURN person
CYPHER