syndesi/cypher-entity-manager 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

syndesi/cypher-entity-manager

最新稳定版本:0.2.0

Composer 安装命令:

composer require syndesi/cypher-entity-manager

包简介

Provides an entity manager for Cypher data types

README 文档

README

GitHub Neo4j Version Support Packagist PHP Version Support (specify version) Packagist Version Packagist Downloads

Test Coverage Maintainability

Syndesi's Cypher Entity Manager

This library provides an entity manager for Cypher data types.
This basically means, that you do not have to write create/merge/delete statements for your nodes, relations etc. per hand. Instead, you just call $em->create($node), $em->merge($node), $em->delete($node) and at the end $em->flush().

Installation

To install this library, run the following code:

composer require syndesi/cypher-entity-manager

This is all, now you can use the library :D

Using the library

use Syndesi\CypherDataStructures\Type\Node;
use Syndesi\CypherEntityManager\Type\EntityManager;

/**
 * note: the container should be provided by your framework. manual configuration is possible, see documentation
 * @var EntityManagerInterface $em 
 */
$em = $container->get(EntityManager::class);

$node = new Node();
$node
    ->addLabel('NodeLabel')
    ->addIdentifier('id', 123)
    ->addProperty('someProperty', 'someValue')
    ->addIdentifier('id');

// create a node:
$em->create($node);
$em->flush();

// update a node:
$node->addProperty('newProperty', 'Hello world :D');
$em->merge($node);
$em->flush();

// delete a node:
$em->delete($node);
$em->flush();

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-09-17