2017 © Pedro Peláez
 

library neo4j-dbal

Abstraction layer of the Neo4j http API

image

innmind/neo4j-dbal

Abstraction layer of the Neo4j http API

  • Saturday, July 28, 2018
  • by Baptouuuu
  • Repository
  • 1 Watchers
  • 1 Stars
  • 1,083 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 20 Versions
  • 10 % Grown

The README.md

neo4j-dbal

Build Status codecov Type Coverage, (*1)

PHP abstraction layer for neo4j graph database, (*2)

Installation

Run the following command in your project to add this library:, (*3)

composer require innmind/neo4j-dbal

Documentation

Basic example to run a query:, (*4)

use function Innmind\Neo4j\DBAL\bootstrap;
use Innmind\Neo4j\DBAL\{
    Query,
    Clause\Expression\Relationship
};
use Innmind\OperatingSystem\Factory;

$os = Factory::build();
$connection = bootstrap(
    $os->remote()->http(),
    $os->clock(),
);

$query = (new Query)
    ->match('n', ['LabelA', 'LabelB'])
        ->withProperty('foo', '$param')
        ->withParameter('param', 'value')
    ->linkedTo('n2')
    ->through('r', 'REL_TYPE', 'right')
    ->return('n', 'n2', 'r');
echo $query->cypher(); //MATCH (n:LabelA:LabelB { foo: $param })-[r:REL_TYPE]->(n2) RETURN n, n2, r

$result = $connection->execute($query);
echo $result->nodes()->count(); //2
echo $result->relationships()->count(); //1

Note: Each object in this library is immutable, so $query->match('n')->match('n2') is different than $query->match('n'); $query->match('n2')., (*5)

Querying

You have 3 options to execute a query:, (*6)

  • use Query to build the query via its API
  • use Cypher where you put the raw cypher query
  • create your own class that implements Query

Structure

, (*7)

The Versions

24/09 2017

4.0.0

4.0.0.0 http://github.com/Innmind/neo4j-dbal

Abstraction layer of the Neo4j http API

  Sources   Download

MIT

The Requires

 

The Development Requires

wrapper neo4j

23/02 2017

3.0.0

3.0.0.0 http://github.com/Innmind/neo4j-dbal

Abstraction layer of the Neo4j http API

  Sources   Download

MIT

The Requires

 

The Development Requires

wrapper neo4j

08/01 2016
18/06 2015
31/05 2015
31/05 2015
01/05 2015
01/05 2015