NAME

FalkorDB - Perl client module for FalkorDB

WARNING

This code was mostly generated using AI tools and has not been checked manually yet. Check the source code before starting to use it!

SYNOPSIS

use FalkorDB;

my $db = FalkorDB->new(
    host => 'falkordb',
    port => 6379,
);

# Select a graph
my $graph = $db->select_graph('SocialNetwork');

# Execute a write query
$graph->query("CREATE (:person {name: 'Alice', age: 30})");

# Execute a parameterized read query
my $res = $graph->query(
    "MATCH (p:person) WHERE p.age = \$age RETURN p.name, p.age",
    { age => 30 }
);

# Iterate over results
while (my $row = $res->next_row()) {
    my ($name, $age) = @$row;
    print "Found person: $name ($age)\n";
}

DESCRIPTION

FalkorDB is a Perl client for FalkorDB, a low-latency graph database built on Redis. It maps Cypher queries to FalkorDB command invocations and parses the RESP output into structured Perl objects (Nodes, Edges, Paths).

METHODS

new(%args)

Creates a new FalkorDB connection. Supported arguments:

  • host - Hostname of the FalkorDB server (default: 'falkordb')

  • port - Port number of the FalkorDB server (default: 6379)

  • username - Username for authentication (optional)

  • password - Password for authentication (optional)

  • redis - An existing Redis::Fast object to reuse

redis()

Returns the underlying Redis::Fast client instance.

select_graph($name) or graph($name)

Selects a graph by name and returns a FalkorDB::Graph instance.

delete_graph($name)

Deletes a graph by name. Returns true on success.

list_graphs()

Returns an array reference of the names of all graphs.

LICENSE AND COPYRIGHT

Copyright (C) 2026 Gabor Szabo

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.