mper/cypher-querybuilder

Cypher QueryBuilder

0.1 2016-12-13 09:59 UTC

This package is auto-updated.

Last update: 2024-11-29 04:46:47 UTC


README

Build Status

A php query builder for cypher queries.

WORK IN PROGRESS

Installation

$ composer require mper/cypher-querybuilder

Usage

<?php

use MP\Cypher\QueryBuilder;

$qb = new QueryBuilder();

$qb->addMatch()
    ->addNode('u', 'user')
    ->relation()->right()
    ->node('n');
$qb->where()->expr("u.name = 'foo'");
$qb->skip(10);
$qb->limit(10);

echo $qb->getQuery('u', 'n');
// MATCH (u:user)-[]->(n) WHERE u.name = 'foo' RETURN u,n SKIP 10 LIMIT 10