syndesi/cypher-entity-manager
最新稳定版本:0.2.0
Composer 安装命令:
composer require syndesi/cypher-entity-manager
包简介
Provides an entity manager for Cypher data types
README 文档
README
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
其他信息
- 授权协议: MIT
- 更新时间: 2022-09-17