Skip to main content

Module field_version

Module field_version 

Source

Functions§

batch_insert_checks_version
Batch-creating multiple versioned items should initialize all versions to 1, and a duplicate within the batch should fail.
create_initializes_version
A newly created record starts with version == 1.
delete_checks_version
Deleting a record checks the version — a fresh handle succeeds.
duplicate_create_fails
Creating the same primary key twice should fail because of the attribute_not_exists condition on the version column.
query_update_multi_key_works
Query-based update on a versioned model: exercises update_by_key path 2 (no unique index, N keys via transact_write_items on DDB).
stale_delete_fails
Deleting from a stale snapshot (wrong version) should fail.
stale_update_fails
Two updates from the same stale snapshot — the second should fail with a condition-check error because the DB version has already moved to 2.
unique_index_stale_update_fails
Stale update on a model with a unique index: the second update from a stale snapshot should fail.
unique_index_update_increments_version
Updating a record through the unique-index path (path 3) increments the version when the unique column changes.
update_increments_version
Updating a record increments the version.