Download the PHP package php-graph-group/cypher-query-builder without Composer

On this page you can find all versions of the php package php-graph-group/cypher-query-builder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cypher-query-builder

Cypher Query Builder

Create Cypher queries in a fluent and easy to understand way via an opinionated builder pattern.

Examples

Simple pattern match example:

This query finds all the colleagues of Alice and Bob:

The builder runs this query and returns the results:

Complex pattern match example

This query contains a more complex pattern that is being built using the pattern builder.

Becomes:

Simple Create example:

Creates a new Person and makes it the colleague of Alice.

The builder runs this query:

Simple Update example:

How it works

Cypher is an incredible query language that offers great flexibility. However, this flexibility can make it difficult to understand and maintain queries, especially in the form of a query builder.

This library aims to make it easier to write and maintain Cypher queries by providing a fluent builder pattern that is understandable.

It specifically limits the possibilities so the builder is easier to reason about and use. All database actions are still possible, but chaining long and complex clauses after another is not possible anymore.

This is because the main angle and opinion this query builder takes is that long complex multi-clausal queries are not preferred. It is difficult to understand and there is a big chance the performance of the queries will degrade.

The builder has only one of each clause available, and the position of these clauses is fixed:

The query builder will only run certain parts of the query depending on which methods you are calling. The methods are intuitive and easy to understand:

Method Runs
get() MATCH - OPTIONAL MATCH - CALL - WHERE - RETURN - ORDER BY - SKIP - LIMIT
create() MATCH - WHERE - CREATE - SET
update() MATCH - WHERE - SET
merge() MATCH - WHERE - MERGE - ON CREATE - ON MATCH
execute() - ALL CLAUSES -

There are some cases where UNWIND is used behind the scenes to allow for mass insertions, but that is beyond the scope of this introduction.

Variable Usage

Variables are used to refer to nodes, relationships and aliases. An alias can refer to a property, node, relationship or function call result.

Because of the way the builder structures the query, Cypher will not allow variable reassignment. To maintain flexibility and to allow for raw statements, the query builder to not check for either existance or reassignment of variables. Only after the query is built and sent to the server will an error occur.

Property Usage

Properties refer to properties on a variable. That means that a user should use the dot notation to unambiguously refer to a property. If the does not use a dot notation and refers just to the property, the builder will use it to refer properties on the variable of the entry node or relationship of the builder.


All versions of cypher-query-builder with dependencies

PHP Build Version
Package Version
Requires wikibase-solutions/php-cypher-dsl Version ^5.0
laudis/neo4j-php-client Version ^3.0.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package php-graph-group/cypher-query-builder contains the following files

Loading the files please wait ....