Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/serverlesstechnology/cqrs
/ functions
Functions
363 in github.com/serverlesstechnology/cqrs
⨍
Functions
363
◇
Types & classes
122
↓ 87 callers
Method
clone
(&self)
src/event.rs:77
↓ 29 callers
Method
push
Push the next event onto the stream.
src/persist/event_stream.rs:38
↓ 18 callers
Method
commit
( &self, events: Vec<A::Event>, context: MemStoreAggregateContext<A>, metadata
src/mem_store.rs:115
↓ 16 callers
Method
when
Consumes a command and provides a validator object to test against. ``` # use cqrs_es::doc::{MyAggregate, MyCommands, MyService}; use cqrs_es::test::
src/test/executor.rs:31
↓ 15 callers
Method
load_aggregate
( &self, aggregate_id: &str, )
src/mem_store.rs:96
↓ 14 callers
Method
write
(&self, event: A::Event, aggregate: &mut A)
src/event_sink.rs:18
↓ 11 callers
Method
given
(self, events: Vec<A::Event>)
src/test/framework.rs:44
↓ 11 callers
Method
load_aggregate
( &self, aggregate_id: &str, )
src/persist/event_store.rs:213
↓ 10 callers
Method
execute
This applies a command to an aggregate. Executing a command in this way is the only way to make changes to the state of an aggregate in CQRS. An erro
src/cqrs.rs:125
↓ 9 callers
Method
insert
( &self, aggregate_payload: Value, aggregate_id: String, current_snapshot: usi
persistence/mysql-es/src/event_repository.rs:241
↓ 9 callers
Method
then_expect_events
Verifies that the expected events have been produced by the command. ``` # use cqrs_es::doc::{MyAggregate, MyCommands, MyEvents, MyService}; # async
src/test/validator.rs:26
↓ 8 callers
Function
default_postgress_pool
A convenience method for building a simple connection pool for PostgresDb. A connection pool is needed for both the event and view repositories. ```
persistence/postgres-es/src/cqrs.rs:20
↓ 8 callers
Function
test_event_envelope
( id: &str, sequence: usize, event: TestEvent, )
persistence/dynamo-es/src/testing.rs:135
↓ 7 callers
Method
collect
(self)
src/event_sink.rs:23
↓ 7 callers
Method
commit
( &self, events: Vec<A::Event>, context: EventStoreAggregateContext<A>, metada
src/persist/event_store.rs:260
↓ 7 callers
Function
default_mysql_pool
A convenience building a simple connection pool for MySql database.
persistence/mysql-es/src/cqrs.rs:9
↓ 7 callers
Method
load_events
( &self, aggregate_id: &str, )
src/persist/event_store.rs:202
↓ 7 callers
Method
then_expect_error_message
Verifies that the result is a `UserError` and returns the internal error payload for further validation. ``` # use cqrs_es::doc::{MyAggregate, MyComm
src/test/validator.rs:46
↓ 6 callers
Method
load_events
( &self, aggregate_id: &str, )
src/mem_store.rs:83
↓ 6 callers
Function
test_dynamodb_client
()
persistence/dynamo-es/src/testing.rs:109
↓ 5 callers
Function
att_as_value
( values: &HashMap<String, AttributeValue>, attribute_name: &str, )
persistence/dynamo-es/src/helpers.rs:42
↓ 5 callers
Method
given_no_previous_events
(self)
src/test/framework.rs:31
↓ 5 callers
Method
insert_events
( &self, events: &[SerializedEvent], )
persistence/dynamo-es/src/event_repository.rs:92
↓ 5 callers
Method
into_response
(self)
demo/src/command_extractor.rs:42
↓ 5 callers
Method
next
Receive the next upcasted event or error in the stream, if no event is available this will block.
src/persist/event_stream.rs:20
↓ 5 callers
Method
with_upcasters
Configures the query replayer to use event upcasters when replaying. The EventUpcasters within the Vec should be placed in the order that they should
src/persist/replay.rs:55
↓ 4 callers
Method
apply
(&self, event: Result<EventEnvelope<A>, PersistenceError>)
src/persist/replay.rs:97
↓ 4 callers
Function
assert_events_eq
( expected: &[EventEnvelope<MyAggregate>], found: &[EventEnvelope<MyAggregate>], )
src/persist/replay.rs:235
↓ 4 callers
Function
att_as_number
( values: &HashMap<String, AttributeValue>, attribute_name: &str, )
persistence/dynamo-es/src/helpers.rs:55
↓ 4 callers
Function
att_as_string
( values: &HashMap<String, AttributeValue>, attribute_name: &str, )
persistence/dynamo-es/src/helpers.rs:70
↓ 4 callers
Function
serialized_event
( entry: HashMap<String, AttributeValue>, )
persistence/dynamo-es/src/event_repository.rs:251
↓ 4 callers
Function
test_dynamodb_client
()
persistence/dynamo-es/tests/lib.rs:15
↓ 4 callers
Function
test_event_envelope
( id: &str, sequence: usize, event: TestEvent, )
persistence/mysql-es/src/testing.rs:105
↓ 4 callers
Function
test_event_envelope
( id: &str, sequence: usize, event: TestEvent, )
persistence/postgres-es/src/testing.rs:106
↓ 3 callers
Function
commit_transactions
( client: &Client, transactions: Vec<TransactWriteItem>, )
persistence/dynamo-es/src/helpers.rs:24
↓ 3 callers
Method
execute_with_metadata
This applies a command to an aggregate. Executing a command in this way is the only way to make changes to the state of an aggregate in CQRS. A `Hash
src/cqrs.rs:167
↓ 3 callers
Method
insert_event
(&self)
persistence/postgres-es/src/sql_query.rs:44
↓ 3 callers
Function
metadata
()
tests/lib.rs:174
↓ 3 callers
Function
require_attribute
( values: &'a HashMap<String, AttributeValue>, attribute_name: &str, )
persistence/dynamo-es/src/helpers.rs:83
↓ 3 callers
Function
test_upcast
()
src/persist/upcaster.rs:333
↓ 2 callers
Method
apply
(&mut self, _event: Self::Event)
src/doc.rs:54
↓ 2 callers
Method
apply
(&mut self, event: Self::Event)
src/persist/event_store.rs:407
↓ 2 callers
Method
create_query
( &self, table: &str, aggregate_type: &str, aggregate_id: &str, )
persistence/dynamo-es/src/event_repository.rs:232
↓ 2 callers
Function
deserialize_events
( events: Vec<SerializedEvent>, upcasters: &[Box<dyn EventUpcaster>], )
src/persist/serialized_event.rs:71
↓ 2 callers
Method
event_type
(&self)
src/persist/event_store.rs:353
↓ 2 callers
Method
event_version
(&self)
src/persist/event_store.rs:359
↓ 2 callers
Method
get_last_event_envelopes
( &self, aggregate_id: &str, context: &EventStoreAggregateContext<A>, )
src/persist/event_store.rs:179
↓ 2 callers
Method
handle
( &mut self, command: Self::Command, _service: &Self::Services,
src/persist/event_store.rs:395
↓ 2 callers
Method
handle_error
(&self, error: PersistenceError)
src/persist/generic_query.rs:111
↓ 2 callers
Method
load
(&self, view_id: &str)
persistence/postgres-es/src/view_repository.rs:60
↓ 2 callers
Method
load_committed_events
( &self, aggregate_id: &str, )
src/mem_store.rs:56
↓ 2 callers
Function
load_dynamo_view
( client: &Client, table_name: &str, view_id: &str, )
persistence/dynamo-es/src/helpers.rs:9
↓ 2 callers
Method
load_with_context
( &self, _view_id: &str, )
src/persist/doc.rs:34
↓ 2 callers
Function
new_application_state
()
demo/src/state.rs:13
↓ 2 callers
Function
new_test_metadata
()
persistence/dynamo-es/src/testing.rs:128
↓ 2 callers
Function
postgres_cqrs
A convenience function for creating a CqrsFramework from a database connection pool and queries.
persistence/postgres-es/src/cqrs.rs:30
↓ 2 callers
Function
process_rows
( mut feed: ReplayFeed, mut rows: BoxStream<'_, Result<MySqlRow, sqlx::Error>>, )
persistence/mysql-es/src/event_repository.rs:138
↓ 2 callers
Method
query_table
( &self, aggregate_type: &str, aggregate_id: &str, table: &str, )
persistence/dynamo-es/src/event_repository.rs:219
↓ 2 callers
Method
replay
Replay the events of a single aggregate instance.
src/persist/replay.rs:80
↓ 2 callers
Method
replay_all
Replay the events of all aggregate instances within the database.
src/persist/replay.rs:89
↓ 2 callers
Method
select_events
( &self, aggregate_id: &str, query: &str, )
persistence/mysql-es/src/event_repository.rs:153
↓ 2 callers
Method
select_events
( &self, aggregate_id: &str, query: &str, )
persistence/postgres-es/src/event_repository.rs:131
↓ 2 callers
Method
set_atm_withdrawal_response
(&self, response: Result<(), AtmError>)
demo/src/domain/aggregate.rs:301
↓ 2 callers
Method
set_validate_check_response
(&self, response: Result<(), CheckingError>)
demo/src/domain/aggregate.rs:304
↓ 2 callers
Function
simple_es_commit_and_load_test
( event_store: PersistedEventStore<MysqlEventRepository, Customer>, )
persistence/mysql-es/tests/lib.rs:36
↓ 2 callers
Function
simple_es_commit_and_load_test
( event_store: PersistedEventStore<PostgresEventRepository, Customer>, )
persistence/postgres-es/tests/lib.rs:39
↓ 2 callers
Function
simple_es_commit_and_load_test
( event_store: PersistedEventStore<DynamoEventRepository, Customer>, )
persistence/dynamo-es/tests/lib.rs:53
↓ 2 callers
Function
stream_events
( query: String, aggregate_type: String, aggregate_id: String, pool: Pool<Postgres>, chann
persistence/postgres-es/src/event_repository.rs:106
↓ 2 callers
Function
unknown_error
(error: SdkError<T>)
persistence/dynamo-es/src/error.rs:83
↓ 2 callers
Method
upcast
(self, upcasters: &[Box<dyn EventUpcaster>])
src/persist/serialized_event.rs:50
↓ 2 callers
Method
upcast
(&self, event: SerializedEvent)
src/persist/upcaster.rs:166
↓ 2 callers
Method
update_view
(&self, view: V, context: ViewContext)
persistence/mysql-es/src/view_repository.rs:93
↓ 2 callers
Method
update_view
(&self, view: V, context: ViewContext)
persistence/postgres-es/src/view_repository.rs:95
↓ 2 callers
Method
update_view
(&self, view: V, context: ViewContext)
persistence/dynamo-es/src/view_repository.rs:90
↓ 1 callers
Method
aggregate
(&mut self)
src/mem_store.rs:188
↓ 1 callers
Method
all_events
(&self)
persistence/mysql-es/src/sql_query.rs:56
↓ 1 callers
Method
all_events
(&self)
persistence/postgres-es/src/sql_query.rs:56
↓ 1 callers
Method
apply
(&mut self, event: Self::Event)
tests/lib.rs:84
↓ 1 callers
Method
apply_events
( &self, view_id: &str, events: &[EventEnvelope<A>], )
src/persist/generic_query.rs:98
↓ 1 callers
Method
atm_withdrawal
(&self, _atm_id: &str, _amount: f64)
demo/src/domain/aggregate.rs:311
↓ 1 callers
Method
can_upcast
(&self, event_type: &str, event_version: &str)
src/persist/upcaster.rs:156
↓ 1 callers
Function
command_handler
Serves as our command endpoint to make changes in a `BankAccount` aggregate.
demo/src/route_handler.rs:26
↓ 1 callers
Method
commit_snapshot_with_addl_events
( &self, current_sequence: usize, num_events: usize, )
src/persist/event_store.rs:21
↓ 1 callers
Function
cqrs_framework
( pool: Pool<Postgres>, )
demo/src/config.rs:11
↓ 1 callers
Method
deser_snapshot
(&self, row: &MySqlRow)
persistence/mysql-es/src/event_repository.rs:311
↓ 1 callers
Method
dispatch
(&self, _aggregate_id: &str, _events: &[EventEnvelope<MyAggregate>])
src/doc.rs:83
↓ 1 callers
Method
dispatch
(&self, _aggregate_id: &str, events: &[EventEnvelope<MyAggregate>])
src/persist/replay.rs:144
↓ 1 callers
Function
dynamodb_cqrs
A convenience function for creating a CqrsFramework from a DynamoDb client and queries.
persistence/dynamo-es/src/cqrs.rs:8
↓ 1 callers
Method
event_type
(&self)
persistence/mysql-es/src/testing.rs:60
↓ 1 callers
Method
event_type
(&self)
persistence/postgres-es/src/testing.rs:60
↓ 1 callers
Method
event_type
(&self)
persistence/dynamo-es/src/testing.rs:67
↓ 1 callers
Method
event_version
(&self)
persistence/mysql-es/src/testing.rs:68
↓ 1 callers
Method
event_version
(&self)
persistence/postgres-es/src/testing.rs:68
↓ 1 callers
Method
event_version
(&self)
persistence/dynamo-es/src/testing.rs:75
↓ 1 callers
Method
handle
( &mut self, command: Self::Command, _service: &Self::Services, sink: &EventSi
src/doc.rs:39
↓ 1 callers
Method
insert
( &self, aggregate_payload: Value, aggregate_id: String, current_snapshot: usi
persistence/postgres-es/src/event_repository.rs:224
↓ 1 callers
Method
insert_event
(&self)
persistence/mysql-es/src/sql_query.rs:44
↓ 1 callers
Method
insert_snapshot
(&self)
persistence/mysql-es/src/sql_query.rs:47
↓ 1 callers
Method
insert_snapshot
(&self)
persistence/postgres-es/src/sql_query.rs:47
↓ 1 callers
Method
load
Loads and deserializes a view based on the provided view id. Use this method to load a materialized view when requested by a user. ``` # use cqrs_es:
src/persist/generic_query.rs:80
next →
1–100 of 363, ranked by callers