Skip to content

Commit

Permalink
feat: projection (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
hseeberger authored Jun 2, 2024
1 parent 5600194 commit 93133d9
Show file tree
Hide file tree
Showing 7 changed files with 956 additions and 131 deletions.
191 changes: 170 additions & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ repository = "https://github.com/hseeberger/evented"
documentation = "https://github.com/hseeberger/evented"

[dependencies]
async-stream = { version = "0.3" }
error-ext = { version = "0.2" }
futures = { version = "0.3" }
secrecy = { version = "0.8", features = [ "serde" ] }
Expand All @@ -19,13 +20,16 @@ serde_json = { version = "1.0" }
serde_with = { version = "3.8" }
sqlx = { version = "0.7", features = [ "postgres", "runtime-tokio" ] }
thiserror = { version = "1.0" }
tokio = { version = "1", features = [ "sync" ] }
tracing = { version = "0.1" }
trait-variant = { version = "0.1" }

[dev-dependencies]
assert_matches = { version = "1.5" }
sqlx = { version = "0.7", features = [ "uuid" ] }
testcontainers = { version = "0.17" }
testcontainers-modules = { version = "0.5", features = [ "postgres" ] }
time = { version = "0.3", features = [ "serde-human-readable" ] }
tokio = { version = "1", features = [ "macros" ] }
tracing-test = { version = "0.2" }
uuid = { version = "1.8", features = [ "serde", "v7" ] }
4 changes: 2 additions & 2 deletions sql/create_event_log_uuid.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ CREATE TABLE
seq_no bigserial PRIMARY KEY,
entity_id uuid NOT NULL,
version bigint NOT NULL,
type text NOT NULL,
event bytea NOT NULL,
type_name text NOT NULL,
event jsonb NOT NULL,
metadata jsonb NOT NULL,
UNIQUE (entity_id, version)
);
2 changes: 2 additions & 0 deletions sql/create_projection.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CREATE TABLE
IF NOT EXISTS projection (name text PRIMARY KEY, seq_no bigint);
Loading

0 comments on commit 93133d9

Please sign in to comment.