falkordb-ex

Elixir client for FalkorDB 4.16.x built on top of Redix. V1 supports single-node and sentinel topologies.

Supported FalkorDB deployments

Installation

Add :falkordb to your dependencies:

def deps do
  [
    {:falkordb, "~> 0.1.0"}
  ]
end

Quick start

{:ok, db} =
  FalkorDB.connect(
    mode: :single,
    url: "redis://127.0.0.1:6379"
  )

graph = FalkorDB.select_graph(db, "social")

{:ok, _} = FalkorDB.Graph.query(graph, "CREATE (:Person {name: 'Alice'})")
{:ok, result} = FalkorDB.Graph.ro_query(graph, "MATCH (n:Person) RETURN n.name AS name")

IO.inspect(result.data)
:ok = FalkorDB.stop(db)

Sentinel

{:ok, db} =
  FalkorDB.connect(
    mode: :sentinel,
    group: "mymaster",
    sentinels: [{"127.0.0.1", 26_379}, {"127.0.0.1", 26_380}]
  )

API coverage

The client includes wrappers for the FalkorDB 4.16.x module command surface:

Test coverage

Test coverage includes both fast unit tests and opt-in integration tests:

Quality checks

Run local checks:

mix check

mix check runs:

Integration tests

Integration tests are opt-in and disabled by default. To run them:

FALKORDB_RUN_INTEGRATION=1 mix test

Standalone

Environment:

Sentinel

Environment:

Examples

Runnable scripts are available under examples/:

Release

This repo includes: