GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - neo4j-php/php-cypher-dsl: A query builder for Cypher written in PHP

BranchesTags
Open more actions menu

Latest commit

 

History

601 Commits
601 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
src
src
 
 
tests
tests
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.php-cs-fixer.dist.php
.php-cs-fixer.dist.php
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
LICENSE
LICENSE
 
 
LIFECYCLE.md
LIFECYCLE.md
 
 
README.md
README.md
 
 
composer.json
composer.json
 
 
infection.json.dist
infection.json.dist
 
 
phpstan.neon.dist
phpstan.neon.dist
 
 
phpunit.xml.dist
phpunit.xml.dist
 
 

Repository files navigation

php-cypher-dsl

The php-cypher-dsl library provides a way to construct Cypher queries in a type-safe manner.

Documentation

The documentation can be found on the wiki here.

Installation

Requirements

php-cypher-dsl requires PHP 8.1 or greater; using the latest version of PHP is highly recommended.

Installation through Composer

You can install php-cypher-dsl through Composer by running the following command:

composer require "wikibase-solutions/php-cypher-dsl"

Contributing

Please refer to CONTRIBUTING.md for information on how to contribute to this project.

Example

To construct a query to find all of Tom Hanks' co-actors, you can use the following code:

use function WikibaseSolutions\CypherDSL\node;
use function WikibaseSolutions\CypherDSL\query;

$tom = node("Person")->withProperties(["name" => "Tom Hanks"]);
$coActors = node();

$statement = query()
    ->match($tom->relationshipTo(node(), "ACTED_IN")->relationshipFrom($coActors, "ACTED_IN"))
    ->returning($coActors->property("name"))
    ->build();

This produces the following Cypher query (where $1 is a random variable name):

MATCH (:Person {name: 'Tom Hanks'})-[:ACTED_IN]->()<-[:ACTED_IN]-($1) RETURN $1.name

About

A query builder for Cypher written in PHP

Topics

cypherneo4jneo4j-phpopencypherphp

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

19 stars

Watchers

6 watching

Forks

5 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.