定制 ikwattro/github2cypher 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

ikwattro/github2cypher

最新稳定版本:1.1.0

Composer 安装命令:

composer require ikwattro/github2cypher

包简介

Github Public Events translated to Neo4j Cypher Statements

README 文档

README

This library leverages the GithubEvent library and convert github event objects to Neo4j Cypher Queries.

Requirements

  • PHP 5.4+

Installation

Add this library to your project dependencies :

composer require ikwattro/github2cypher

Usage

The usage of the library is straightforward, instantiate the Github2CypherConverter class and pass your GithubEvent objects to the convert method :

use Ikwattro\Github2Cypher\Github2CypherConverter;

$converter = new Github2CypherConverter();

// Assuming you have a collection of GithubEvent objects

foreach ($events as $event) {
    $statements = $converter->convert($event);
    // Returns a collection of statements of the form ['query' => 'MATCH xxx...', 'params' => ['p1' => 'v1', 'p2' => 'v2', ..]
}

You can then use NeoClient to import the queries into Neo4j.

Indexes and Constraints

If you plan to import the queries into Neo4j (which is the goal), you can create the needed indexes and unique constraints easily.

These two methods returns you an array of indexes or constraints to create on labels/properties :

  • getInitialSchemaIndexes();
  • getInitialSchemaConstraints();

Author

Christophe Willemsen

License

Released under the MIT License. Please read the LICENSE file attached with this package.

统计信息

  • 总下载量: 137
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-02-23