Tai.Trading.OrderStore.Backends.ETS (tai v0.0.61)
Link to this section Summary
Functions
Return a list of all orders currently stored in the ETS table
Return the order from the ETS table that matches the given client_id
Insert an order into the ETS table
Update an existing order in the ETS table
Link to this section Types
Link to this type
action()
Specs
action() :: term()
Link to this type
client_id()
Specs
client_id() :: Tai.Trading.Order.client_id()
Link to this type
order()
Specs
order() :: Tai.Trading.Order.t()
Link to this type
status()
Specs
status() :: Tai.Trading.Order.status()
Link to this type
table_name()
Specs
table_name() :: atom()
Link to this section Functions
Link to this function
all(table_name)
Specs
all(table_name()) :: [] | [order()]
Return a list of all orders currently stored in the ETS table
Link to this function
create(table_name)
Specs
create(table_name()) :: :ok
Link to this function
find_by_client_id(client_id, table_name)
Specs
find_by_client_id(client_id(), table_name()) :: {:ok, order()} | {:error, :not_found}
Return the order from the ETS table that matches the given client_id
Link to this function
insert(order, table_name)
Specs
insert(order(), table_name()) :: {:ok, order()}
Insert an order into the ETS table
Link to this function
update(order, table_name)
Specs
update(action(), table_name()) :: {:ok, order()}
Update an existing order in the ETS table