定制 technoly/neoseventstore-cycleadapter 二次开发

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

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

technoly/neoseventstore-cycleadapter

最新稳定版本:2.0.0

Composer 安装命令:

composer require technoly/neoseventstore-cycleadapter

包简介

Cycle ORM based implementation for the neos/event-store

README 文档

README

Database Adapter implementation for the neos/eventstore package. It is essentially an adaption of the Doctrine adapter for Cycle ORM / the Spiral framework.

Note Currently this package supports MySQL (including MariaDB) and PostgreSQL.

Usage

Install via composer:

composer require technoly/neoseventstore-cycleadapter

Create an instance

To create a CycleEventStore, an instance of \Cycle\Database\DatabaseInterface is required. It can be obtained via the DatabaseManager or configured in your Spiral bootloader if you are using the Spiral framework.

See Cycle documentation for more details.

With that, an Event Store instance can be created:

use Cycle\Database;
use Cycle\Database\Config;
use Technoly\NeosEventStore\CycleAdapter\CycleEventStore;

$dbConfig = new Config\DatabaseConfig([
    // your database configuration
]);
$dbal = new Database\DatabaseManager($dbConfig);

$eventTableName = 'some_namespace_events';
$eventStore = new CycleEventStore($dbal->database('default'), $eventTableName);

See README of the neos/eventstore package for details on how to write and read events.

Known limitations

The CycleEventStore->status() method returns OK even if setup is required due to false positives for MariaDB (JSON column stored as longtext).

Contribution

Contributions in the form of issues or pull requests are highly appreciated.

License

See LICENSE

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-03-27