Initialise the AWS SDK DynamoDB Document Client from the JSON-encoded
connectionStr. Does not perform any network call.
Delete an entity by its primary key values.
[partitionKey, rowKey]
Release the client reference.
Fetch a single entity by its primary key values.
[partitionKey, rowKey]
Attach a static OINONoSqlDataModel to the given API, adding the five
standard fields that mirror the OINONoSqlEntry structure.
Field mapping to DynamoDB item attributes:
| OINO field | DynamoDB attribute | Key role |
|---|---|---|
_hashKeyAttr |
discovered HASH attr | Partition key |
_rangeKeyAttr |
discovered RANGE attr | Sort key |
timestamp |
_timestamp |
Managed, string |
etag |
_etag |
Managed, string |
properties |
(all other attrs) | JSON-serialised |
the OINONoSqlApi whose data model is to be initialised
List entities from the table.
Uses Query when an equality predicate on partitionKey can be
extracted from the filter (or when staticPartitionKey is set);
otherwise falls back to Scan.
All predicates except like are translated to a DynamoDB
FilterExpression and evaluated server-side. like predicates are
evaluated in-memory after the response is received.
Optionalfilter: OINOQueryFilteroptional query filter to apply
Batch-upsert using DynamoDB BatchWriteCommand. DynamoDB limits each
call to 25 items; entries are chunked accordingly. Any items returned
in UnprocessedItems (capacity exceeded) are retried once before
throwing.
Upsert (insert or replace) an entity.
_timestamp is set to the current UTC time on every upsert.
_etag is set to a new UUID v4 on every upsert.
All fields in entry.properties are written as top-level DynamoDB item
attributes alongside the key and system fields.
entity to upsert
Verify that the target table exists, read its key schema, and store the
HASH and RANGE attribute names for use by all subsequent operations.
Both key attributes must be of type String (S).
StaticbuildWalk the OINOQueryFilter tree and attempt to build a DynamoDB
FilterExpression string, accumulating placeholder names and values
into builder.
Returns undefined for sub-trees that contain untranslatable predicates
(currently only the like operator). For OR nodes, if either child
cannot be expressed, the entire OR returns undefined because omitting
one branch would change the semantics.
filter node to translate
mutable accumulator for placeholder names / values
AWS DynamoDB implementation of
OINONoSql.Authenticates using static IAM credentials supplied as a JSON-encoded connection string. Connection parameters map as:
params.url→ optional custom endpoint URL (e.g. for DynamoDB Local:http://localhost:8000)params.table→ DynamoDB table nameparams.connectionStr→ JSON string:{"region":"…","accessKeyId":"…","secretAccessKey":"…"}params.staticPartitionKey→ scope all operations to a fixed partition keyRegister and use via the factory:
DynamoDB table schema
The target table must have:
The actual attribute names are read from the table during
validate()and stored on the instance. The OINO API field names (partitionKey,rowKey) will reflect the real DynamoDB attribute names once the backend is validated.Two additional system attributes are managed automatically:
_timestamp– ISO-8601 timestamp, set on every upsert_etag– UUID v4, regenerated on every upsertAll custom entity data is stored as top-level item attributes and serialised into
OINONoSqlEntry.propertieson read.Static partition key
Set
staticPartitionKeyto scope all operations to a fixed partition key, allowing multiple logical tables to share one physical DynamoDB table:Filter support
Filters on
partitionKeyare used to choose betweenQuery(cheap, when an equality predicate onpartitionKeyis detected) andScan(full-table).All predicates except
likeare translated to DynamoDBFilterExpression(evaluated server-side, but billed at scan cost).likepredicates are evaluated in-memory after the DynamoDB response is received.DynamoDB operators supported:
=,<>,<,<=,>,>=,attribute_exists,attribute_not_exists,AND,OR,NOT.