EventBusDatastore.Store (event_bus_datastore v0.1.3)
Basic db actions. Stolen from here: https://github.com/otobus/event_bus_postgres/blob/main/lib/event_bus_postgres/store.ex
Link to this section Summary
Functions
Fetch all events with pagination
Batch insert
Total events since given time
Total events per topic since given time
Delete an event
Delete expired events
Find an event
Find all events with pagination
Link to this section Functions
Link to this function
all(map \\ %{page: 1, per_page: 20, since: 0})
Fetch all events with pagination
Link to this function
batch_insert(events)
Batch insert
Link to this function
count(map \\ %{since: 0})
Total events since given time
Link to this function
count_per_topic(map \\ %{since: 0})
Total events per topic since given time
Link to this function
delete(id)
Delete an event
Link to this function
delete_expired()
Delete expired events
Link to this function
find(id)
Find an event
Link to this function
find_all_by_transaction_id(map \\ %{page: 1, per_page: 20, since: 0, transaction_id: nil})
Find all events with pagination
Link to this function
repo()
Link to this function