wikibase-solutions / php-cypher-dsl
使用 PHP 编写的 Cypher 查询语言的查询构建器
6.0.0
2023-09-19 09:30 UTC
Requires
- php: >=7.4
- ext-ctype: *
- ext-openssl: *
- symfony/polyfill-php80: ^1.25
- symfony/polyfill-php81: ^1.25
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- infection/infection: ^0.25.5
- phpstan/phpstan: ^1.8
- phpunit/phpunit: ~9.0
- rregeer/phpunit-coverage-check: ^0.3.1
- dev-main
- 6.0.0
- 5.0.0
- 4.4.1
- 4.4.0
- 4.3.0
- 4.2.0
- 4.1.0
- 4.0.0
- 3.5.0
- 3.4.1
- 3.4.0
- 3.3.1
- 3.3.0
- 3.2.0
- 3.1.0
- 3.0.1
- 3.0.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.0
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.0
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.0
- 1.0.0
- dev-feature/rewrite-cast-trait-to-static
- dev-feature/use-union-types
- dev-development
- dev-support/5.0
This package is auto-updated.
Last update: 2024-09-07 16:49:13 UTC
README
php-cypher-dsl
库提供了一种以面向对象和类型安全的方式构建高级 Cypher 查询的方法。
文档
安装
需求
php-cypher-dsl
需要 PHP 7.4 或更高版本;强烈推荐使用最新版本的 PHP。
通过 Composer 安装
您可以通过运行以下命令通过 Composer 安装 php-cypher-dsl
composer require "wikibase-solutions/php-cypher-dsl"
贡献
有关如何为此项目做出贡献的信息,请参阅 CONTRIBUTING.md。
示例
要构建一个查询以找到汤姆·汉克斯的所有共同演员,您可以使用以下代码
use function WikibaseSolutions\CypherDSL\node; use function WikibaseSolutions\CypherDSL\query; $tom = node("Person")->withProperties(["name" => "Tom Hanks"]); $coActors = node(); $statement = query() ->match($tom->relationshipTo(Query::node(), "ACTED_IN")->relationshipFrom($coActors, "ACTED_IN")) ->returning($coActors->property("name")) ->build();