{"repo":"GaloyMoney/es-entity","free":true,"listed":false,"github":"https://github.com/GaloyMoney/es-entity","clone":"git clone https://github.com/GaloyMoney/es-entity.git","description":"Framework for persisting event-sourced entities in PostgreSQL.","language":"Rust","stars":24,"topics":["event-sourcing","postgresql","rust","sqlx"],"license":"Apache-2.0","category":"databases-storage","readme_excerpt":"es-entity An Event Sourcing Entity Framework for Rust that simplifies building event-sourced applications with PostgreSQL. The framework enables writing Entities that are: - Event Sourced - Entities are hydrated via event projection. - Idempotent - Built-in guards against duplicate operations - Testable - Clean separation between domain logic and persistence Persisted to postgres with: - Minimal boilerplate - Derive macros generate repository methods automatically - Compile-time verified - All SQL queries are checked at compile time via sqlx - Optimistic concurrency - Automatic detection of concurrent updates via event sequences - Pagination - Cursor-based pagination out of the box Book API Docs GitHub repository Cargo package Free of any unsafe code #![forbid(unsafe code)] to ensure everything is implemented in 100% safe Rust. Quick Example Entity First you need your entity: Persistence Setup your database - each entity needs 2 tables. Repository methods are generated: Usage Getting Started Installation Add to your Cargo.toml : Advanced features Transactions All Repository functions exist in 2 flavours. The in op postfix receives an additional argument for the DB connection. This enables atomic operations across multiple entities. Nested Entities Support for aggregates and child entities: Forgettable Payloads Events are immutable — but regulations like GDPR require deleting personal data. Wrap fields in Forgettable to store their values outside the event stream, so forget() ","default_branch":null,"files":null,"tree":[],"storefront":"/r/GaloyMoney","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/GaloyMoney/es-entity/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}