Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/go1com/neo4j_builder

Add builder interface to graphaware/neo4j-php-client
https://github.com/go1com/neo4j_builder

go1 neo4j neo4j-graph

Last synced: 3 months ago
JSON representation

Add builder interface to graphaware/neo4j-php-client

Awesome Lists containing this project

README

        

GO1 Neo4j Query Builder for PHP [![Build Status](https://travis-ci.org/go1com/neo4j_builder.svg?branch=master)](https://travis-ci.org/go1com/neo4j_builder)
====

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

## Install

`composer require go1/neo4j-builder`

## Init class

```php
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

```php
$query = $client->match('u.User')
->where('u.id', 'id')
->andWhere('u.mail', 'mail')
->setParameters([
'id' => 10,
'mail' => '[email protected]'
])
->return(['u.id', 'u.mail'])
->skip(0)
->limit(10)
->execute();
```