Liking cljdoc? Tell your friends :D

konserve-dynamodb.core

DynamoDB based konserve backend.

DynamoDB based konserve backend.
raw docstring

batch-delete-items!clj

(batch-delete-items! client table-name store-keys)

Delete store-keys with BatchWriteItem DeleteRequests: non-atomic, at most 25 keys per request, idempotent (deleting a missing item succeeds). Unprocessed items are retried with bounded backoff; keys still unprocessed afterwards are reported in :failed. Returns {:deleted #{...} :failed {key diagnostic}} covering every distinct requested key exactly once.

A request that throws (transport, or throttling the SDK's own retries did not overcome) has an unknown outcome. Before any key is confirmed the error is rethrown. After that, the confirmed keys are not discarded: the keys of the failed request and of every chunk not yet sent are reported in :failed with the error, and no further request is sent.

Delete `store-keys` with BatchWriteItem DeleteRequests: non-atomic, at most 25
keys per request, idempotent (deleting a missing item succeeds). Unprocessed
items are retried with bounded backoff; keys still unprocessed afterwards are
reported in `:failed`. Returns {:deleted #{...} :failed {key diagnostic}}
covering every distinct requested key exactly once.

A request that throws (transport, or throttling the SDK's own retries did not
overcome) has an unknown outcome. Before any key is confirmed the error is
rethrown. After that, the confirmed keys are not discarded: the keys of the
failed request and of every chunk not yet sent are reported in `:failed` with
the error, and no further request is sent.
sourceraw docstring

batch-delete-limitclj

BatchWriteItem accepts at most 25 write requests per call.

BatchWriteItem accepts at most 25 write requests per call.
sourceraw docstring

batch-delete-retriesclj

Retries of UnprocessedItems per BatchWriteItem chunk before giving up.

Retries of UnprocessedItems per BatchWriteItem chunk before giving up.
sourceraw docstring

batch-get-itemsclj

(batch-get-items client table-name store-keys consistent-read?)
(batch-get-items client table-name store-keys consistent-read? keys-only?)

Fetch up to 100 distinct keys, retrying partial responses with bounded backoff. Returns an aggregated BatchGetItemResponse. Exhaustion throws rather than presenting unprocessed keys as missing. With keys-only? only the "Key" attribute is returned (an existence check does not need the values).

Fetch up to 100 distinct keys, retrying partial responses with bounded backoff.
Returns an aggregated BatchGetItemResponse. Exhaustion throws rather than
presenting unprocessed keys as missing. With `keys-only?` only the "Key"
attribute is returned (an existence check does not need the values).
sourceraw docstring

batch-write-fragments!clj

(batch-write-fragments! client table items)

Stage at most 25 immutable 300 KiB fragments. Even with base64 and envelope overhead this stays below BatchWriteItem's 16 MiB wire limit. Retry only UnprocessedItems; callers must not publish manifests until this succeeds.

Stage at most 25 immutable 300 KiB fragments. Even with base64 and envelope
overhead this stays below BatchWriteItem's 16 MiB wire limit. Retry only
UnprocessedItems; callers must not publish manifests until this succeeds.
sourceraw docstring

connect-storeclj

(connect-store dynamodb-spec & {:keys [opts] :as params})
source

create-dynamodb-tableclj

(create-dynamodb-table client table-name {:keys [read-capacity write-capacity]})
source

delete-dynamodb-tableclj

(delete-dynamodb-table client table-name)
source

delete-itemclj

(delete-item client table-name key)
source

delete-storeclj

(delete-store dynamodb-spec & {:keys [opts]})
source

dynamodb-clientclj

(dynamodb-client opts)

Creates a new DynamoDB client using the provided options, with explicit credential handling.

Creates a new DynamoDB client using the provided options, with explicit credential handling.
sourceraw docstring

get-itemclj

(get-item client table-name key consistent-read?)
source

put-itemclj

(put-item client table-name item)
source

put-item-conditionalclj

(put-item-conditional client table-name item expected-meta)

PutItem only if the stored Meta attribute is still expected-meta — or, when that is ::absent, only if the item does not exist. True on success, false when DynamoDB refuses.

DynamoDB evaluates the condition itself, atomically with the write, which is what makes this backing's guarantee :global: it holds against every writer anywhere, not merely those sharing a filesystem or a heap.

The condition compares the META attribute rather than a separate version column. konserve's revision lives inside the serialized metadata, so the meta bytes ARE the revision as far as this item is concerned — and comparing them needs no schema change, no second attribute to keep in step, and no migration for existing tables. Meta is small; the value is not compared and not sent.

Expression attribute NAMES for both Key and Meta: KEY is a DynamoDB reserved word, and a literal in an expression would be rejected.

PutItem only if the stored `Meta` attribute is still `expected-meta` — or, when
that is `::absent`, only if the item does not exist. True on success, false
when DynamoDB refuses.

DynamoDB evaluates the condition itself, atomically with the write, which is
what makes this backing's guarantee `:global`: it holds against every writer
anywhere, not merely those sharing a filesystem or a heap.

The condition compares the META attribute rather than a separate version
column. konserve's revision lives inside the serialized metadata, so the meta
bytes ARE the revision as far as this item is concerned — and comparing them
needs no schema change, no second attribute to keep in step, and no migration
for existing tables. Meta is small; the value is not compared and not sent.

Expression attribute NAMES for both `Key` and `Meta`: `KEY` is a DynamoDB
reserved word, and a literal in an expression would be rejected.
sourceraw docstring

releaseclj

(release store env)

Release the store connection.

Release the store connection.
sourceraw docstring

scan-key-pageclj

(scan-key-page client table-name cursor limit consistent-read?)

One bounded page of the table's physical keys. Scan with limit items read (DynamoDB also stops a page at 1 MB read), projecting only the key attribute. cursor is nil to start, else the last key of the previous page (the table's only key attribute is the hash key Key). Fragment items are internal to this layout and left out, as -keys leaves them out; so a page can be empty and still have a next cursor. Returns {:keys [...] :cursor next-or-nil}.

One bounded page of the table's physical keys. Scan with `limit` items read
(DynamoDB also stops a page at 1 MB read), projecting only the key attribute.
`cursor` is nil to start, else the last key of the previous page (the table's
only key attribute is the hash key `Key`). Fragment items are internal to this
layout and left out, as `-keys` leaves them out; so a page can be empty and
still have a next cursor. Returns {:keys [...] :cursor next-or-nil}.
sourceraw docstring

scan-tableclj

(scan-table client table-name)
(scan-table client table-name start-key)
(scan-table client table-name start-key consistent-read?)
source

store-exists?clj

(store-exists? dynamodb-spec & {:keys [opts]})
source

table-exists?clj

(table-exists? client table-name)
source

transact-write-itemsclj

(transact-write-items client transact-items)

Execute multiple write operations in a single, atomic transaction. Limited to 100 items per transaction by DynamoDB.

Execute multiple write operations in a single, atomic transaction.
Limited to 100 items per transaction by DynamoDB.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close