Skip to content

Releases: circles-learning-labs/ecto_adapters_dynamodb

Set `state: :loaded` metadata on retrieved records.

10 Nov 15:39
Compare
Choose a tag to compare

When returning existing records, it is expected that the the metadata for such a record will include state: :loaded. Ecto provides a process callback function which other adapters use during the decoding process to map the data from the record into the returned struct, including this piece of metadata; however, the current decoding process for this adapter is not structured to make use of that callback, so this metadata is set by other means - this release handles this task.

Ecto metadata reference:
https://hexdocs.pm/ecto/2.2.6/Ecto.Schema.Metadata.html

Refactored and cleaned up tests

11 Sep 00:58
Compare
Choose a tag to compare

This version features a cleaned-up set of tests - there's been some refactoring, code cleanup, and removal of useless/redundant tests.

Handle insert_all() with more than 25 items

13 Jun 20:03
Compare
Choose a tag to compare

DynamoDB restricts the number of items that can be inserted during a batch write operation to 25 - so in previous versions, Repo.insert_all() would fail if there were more than 25 items in the collection. In this release, we provide basic handling to allow for an unlimited number of records to be written in one transaction.

As we're not yet retrying items that fail to write during a batch operation, a list of any failed inserts will be logged as "UnprocessedItems".

See https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchWriteItem.html for reference.

batch_get bug fix

23 May 21:11
Compare
Choose a tag to compare

This release fixes a bug where batch_get queries for lists of interpolated values was failing. Queries in both of the following formats will now work...

Repo.all(from m in Model, where: m.id in ["id_1", "id_2"])

# or...

model_ids = ["id_1", "id_2"]
Repo.all(from m in Model, where: m.id in ^model_ids)

Improved Migration Support

28 Mar 14:55
Compare
Choose a tag to compare

This release supports create_if_not_exists and drop_if_exists options when migrating updates to indexes.

Improved migration support

29 Nov 02:44
3aace9c
Compare
Choose a tag to compare

Improved migration support with drop_if_exists