FalkorDB
FalkorDB is a graph database built on top of Redis that you query using the Cypher query language.
require "falkor"
struct Person
include FalkorDB::Serializable::Node
getter id : Int64
getter name : String
end
redis = Redis::Client.new
# Store the graph data in the Redis key "my-graph"
graph = FalkorDB::Graph.new(redis, "my-graph")
# Create some data in our graph
graph.write_query <<-CYPHER, id: 123, name: "Jamie"
CREATE (person:Person{id: $id, name: $name})
CYPHER
# The `return` argument specifies the return types of the results in your
# Cypher query's `RETURN` clause
pp graph.read_query(<<-CYPHER, {id: 123}, return: {Person})
MATCH (person:Person{id: $id})
RETURN person
CYPHER
# => [{Person(
# @id=123,
# @name="Jamie",
# @node=
# FalkorDB::Serializable::Node::Metadata(@id=0, @labels=["Person"]))}]
In addition to basic Redis property types, FalkorDB::Serializable types
also support Bool, UUID, and Time.
Nested types
- FalkorDB::Cache
- FalkorDB::ConstraintViolation
- FalkorDB::Constraints
- FalkorDB::Duration
- FalkorDB::Error
- FalkorDB::Field
- FalkorDB::Graph
- FalkorDB::Index
- FalkorDB::Indices
- FalkorDB::List
- FalkorDB::LocalDate
- FalkorDB::LocalDateTime
- FalkorDB::LocalTime
- FalkorDB::Map
- FalkorDB::Node
- FalkorDB::NodeLabel
- FalkorDB::Path
- FalkorDB::Point
- FalkorDB::Relationship
- FalkorDB::RelationshipType
- FalkorDB::ResultSet(T)
- FalkorDB::Serializable
- FalkorDB::SlowQuery
- FalkorDB::UnexpectedValue
- FalkorDB::Value
- FalkorDB::ValueType
- FalkorDB::VectorF32