Skip to content

FalkorDB/falkordb-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

falkordb-php

A FalkorDB client for PHP that uses phpredis as its connectivity layer.

Installation

composer require falkordb/falkordb-php

Basic usage

<?php
require __DIR__ . '/vendor/autoload.php';

use FalkorDB\FalkorDB;
use FalkorDB\Graph\ConstraintType;
use FalkorDB\Graph\EntityType;

$db = FalkorDB::connect([
    'host' => '127.0.0.1',
    'port' => 6379,
]);

$graph = $db->selectGraph('social');
$graph->query("CREATE (:Person {name:'Alice'})");
$graph->constraintCreate(ConstraintType::UNIQUE, EntityType::NODE, 'Person', 'name');
$result = $graph->query("MATCH (n:Person) RETURN n.name");

var_dump($result->data);

Features

  • Single, cluster, and sentinel topology adapters (based on phpredis)
  • Rich compact-reply parsing (nodes, edges, paths, maps, vectors, point, temporal values)
  • Cypher query parameter serialization
  • Graph and admin command coverage (GRAPH.QUERY, GRAPH.RO_QUERY, GRAPH.INFO, GRAPH.LIST, GRAPH.CONSTRAINT, GRAPH.UDF, etc.)

Quality checks

composer qa

Optional integration tests

docker compose -f docker/standalone-compose.yml up -d
composer test:integration

Contributing

Contributions are welcome via issues and pull requests.

If you plan to make a significant change, please open an issue first so the approach can be discussed before implementation.

License

This repository is licensed under the "MIT" license.

About

FalkorDB Php Client, with full clustering support, up to date API support (temporal data types, UDF and more)

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages