View Source Ecto.Adapters.DynamoDB.Cache (ecto_adapters_dynamodb v3.4.0)
An Elixir agent to cache DynamoDB table schemas and the first page of results for selected tables
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
Types
@type t() :: %Ecto.Adapters.DynamoDB.Cache{ ex_aws_config: term(), schemas: map(), tables: [cached_table()] }
Functions
@spec describe_table(Ecto.Repo.t(), table_name_t()) :: {:ok, dynamo_response_t()} | {:error, term()}
@spec 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
@spec scan(Ecto.Repo.t(), table_name_t()) :: {:ok, dynamo_response_t()} | {:error, term()}
@spec 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
@spec start_link(Ecto.Repo.t()) :: Agent.on_start()
@spec update_cached_table(Ecto.Repo.t(), table_name_t()) :: :ok | {:error, term()}
@spec 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
@spec update_table_info(Ecto.Repo.t(), table_name_t()) :: :ok | {:error, term()}
@spec 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