Ecto.Adapters.DynamoDB.Cache (ecto_adapters_dynamodb v3.0.0) View Source
An Elixir agent to cache DynamoDB table schemas and the first page of results for selected tables
Link to this section Summary
Functions
Returns the cached value for a call to DynamoDB, describe-table. Performs a DynamoDB scan if not yet cached and raises any errors as a result of the request. The raw json is presented as an elixir map.
Returns the current cache of table schemas, and cache of first page of results for selected tables, as an Elixir map
Returns the cached first page of results for a table. Performs a DynamoDB scan if not yet cached and raises any errors as a result of the request
Performs a DynamoDB scan and caches (without returning) the first page of results. Raises any errors as a result of the request
Performs a DynamoDB, describe-table, and caches (without returning) the result. Raises any errors as a result of the request
Link to this section Types
Specs
Specs
t() :: %Ecto.Adapters.DynamoDB.Cache{ ex_aws_config: term(), schemas: map(), tables: [cached_table()] }
Link to this section Functions
Specs
describe_table(Ecto.Repo.t(), table_name_t()) :: {:ok, dynamo_response_t()} | {:error, term()}
Specs
describe_table!(Ecto.Repo.t(), table_name_t()) :: dynamo_response_t() | no_return()
Returns the cached value for a call to DynamoDB, describe-table. Performs a DynamoDB scan if not yet cached and raises any errors as a result of the request. The raw json is presented as an elixir map.
Returns the current cache of table schemas, and cache of first page of results for selected tables, as an Elixir map
Specs
scan(Ecto.Repo.t(), table_name_t()) :: {:ok, dynamo_response_t()} | {:error, term()}
Specs
scan!(Ecto.Repo.t(), table_name_t()) :: dynamo_response_t() | no_return()
Returns the cached first page of results for a table. Performs a DynamoDB scan if not yet cached and raises any errors as a result of the request
Specs
start_link(Ecto.Repo.t()) :: Agent.on_start()
Specs
update_cached_table(Ecto.Repo.t(), table_name_t()) :: :ok | {:error, term()}
Specs
update_cached_table!(Ecto.Repo.t(), table_name_t()) :: :ok | no_return()
Performs a DynamoDB scan and caches (without returning) the first page of results. Raises any errors as a result of the request
Specs
update_table_info(Ecto.Repo.t(), table_name_t()) :: :ok | {:error, term()}
Specs
update_table_info!(Ecto.Repo.t(), table_name_t()) :: :ok | no_return()
Performs a DynamoDB, describe-table, and caches (without returning) the result. Raises any errors as a result of the request