go1/neo4j-builder

This package is abandoned and no longer maintained. No replacement package was suggested.

dev-main 2018-12-27 01:16 UTC

This package is auto-updated.

Last update: 2024-08-14 02:00:03 UTC


README

GO1 Neo4j Builder is the most advanced and flexible Neo4j Client for PHP.

Install

composer require go1/neo4j-builder

Init class

use go1\neo4j_builder\Neo4jBuilder;
use GraphAware\Neo4j\Client\ClientBuilder;

$config = ['client_class' => Neo4jBuilderClient::class];
$builder = ClientBuilder::create($config);
$builder->addConnection('default', 'NEO4J_URL');

$client = $builder->build();

Usage Examples

$query = $client->match('u.User')
    ->where('u.id', 'id')
    ->andWhere('u.mail', 'mail')
    ->setParameters([
        'id'   => 10,
        'mail' => 'abc@go1.com'
    ])
    ->return(['u.id', 'u.mail'])
    ->skip(0)
    ->limit(10)
    ->execute();