承接 innmind/neo4j-dbal 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

innmind/neo4j-dbal

最新稳定版本:6.1.0

Composer 安装命令:

composer require innmind/neo4j-dbal

包简介

Abstraction layer of the Neo4j http API

README 文档

README

Build Status codecov Type Coverage

PHP abstraction layer for neo4j graph database

Installation

Run the following command in your project to add this library:

composer require innmind/neo4j-dbal

Documentation

Basic example to run a query:

use function Innmind\Neo4j\DBAL\bootstrap;
use Innmind\Neo4j\DBAL\{
    Query,
    Clause\Expression\Relationship
};
use Innmind\OperatingSystem\Factory;

$os = Factory::build();
$connection = bootstrap(
    $os->remote()->http(),
    $os->clock(),
);

$query = (new Query)
    ->match('n', ['LabelA', 'LabelB'])
        ->withProperty('foo', '$param')
        ->withParameter('param', 'value')
    ->linkedTo('n2')
    ->through('r', 'REL_TYPE', 'right')
    ->return('n', 'n2', 'r');
echo $query->cypher(); //MATCH (n:LabelA:LabelB { foo: $param })-[r:REL_TYPE]->(n2) RETURN n, n2, r

$result = $connection->execute($query);
echo $result->nodes()->count(); //2
echo $result->relationships()->count(); //1

Note: Each object in this library is immutable, so $query->match('n')->match('n2') is different than $query->match('n'); $query->match('n2').

Querying

You have 3 options to execute a query:

  • use Query to build the query via its API
  • use Cypher where you put the raw cypher query
  • create your own class that implements Query

Structure

统计信息

  • 总下载量: 1.54k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-05-01