Amazon DynamoDB · Types · Services and connections
ArxDynamoDbService
Definition
- Namespace
ARX.SDK.DynamoDb.Services- Package
ARX.SDK.DynamoDb
public class ArxDynamoDbServiceThe DynamoDB service: Create, Update, Delete, Retrieve and RetrieveMultiple against the tables an ArxDynamoModel describes, in either design: a table per entity, or a single table with key templates. Give it the application's IAmazonDynamoDB client (the AWS SDK's own configuration: credentials, region, and a service URL for DynamoDB Local), the model and, usually, the schema catalog. It holds no connection, so one instance serves the application.
Constructor
ArxDynamoDbService(IAmazonDynamoDB client, ArxDynamoModel model, ArxSchemaCatalog? schema = null)A service for the model's tables.
Parameter Type Description clientIAmazonDynamoDBThe DynamoDB client; ARX never disposes it. modelArxDynamoModelHow each entity is laid out in its table. schemaArxSchemaCatalog?= nullThe schema catalog: ids (supplied only), keys, lookups, selection sets, declared types; null for none.
Properties
IAmazonDynamoDB Client { get; }The application's DynamoDB client.
ArxDynamoModel Model { get; }Where each entity lives and how its keys are made.
ArxSchemaCatalog Schema { get; }The ids, keys, lookups and selection sets; null when the service has none.
IArxSelectionSetCatalog SelectionSetCatalog { get; }The selection sets writes are validated against.
byte[]? PagingCookieKey { get; set; }The key of the paging cookies (
PagingCookie): 32 bytes or more. Null (the default) uses a random key of the process's own (every service in it shares it), which is right for one process. An application that runs several instances behind one address, or keeps cookies across a restart, sets the same key on every instance (from its configuration or secret store): otherwise a cookie that reaches another instance is ARX1001. Set it before the first call.ArxPagingCookieProtection PagingCookieProtection { get; set; }How paging cookies are protected:
Sealedby default (a client can neither read nor change a cookie, which carries the last item's key values),Signed(readable, not changeable) orPlain. Set it before the first call; every instance needs the same.IArxProviderCapabilities Capabilities { get; }What DynamoDB supports through ARX: paging by cookie, transactions as write batches sent at commit, the multiple-item writes (up to 100 all or nothing), Or in filters, queries of a named secondary index, optimistic concurrency through a version column. Not joins, grouping, page numbers, totals, Execute, pattern conditions (case-sensitive only with an opt-in) or upsert.
bool Strict { get; set; }True: the catalog's columns are an allow list; an entity the catalog doesn't list, or an attribute it doesn't list (the key attributes always count), is ARX1018 before anything is sent. Needs a catalog whose every table has columns.
Methods
Task<ArxTransaction> BeginTransactionAsync(CancellationToken cancellationToken = default)Begins a transaction on a connection of its own (a new
ArxDynamoConnection), for code that works throughIArxDataServiceand so can't name the provider's connection type. Pass it to the calls, then commit it; disposing it without committing rolls it back, and closes its connection:await using var transaction = await service.BeginTransactionAsync();Parameter Type Description cancellationTokenCancellationToken= defaultCancels the call. Task<ArxRecordId> CreateAsync(ArxEntity entity, CancellationToken cancellationToken = default)Inserts one item and returns its id (the declared, supplied id;
Nonewhen none is declared). The put carriesattribute_not_existson the partition key, so an existing key is ARX3001 and never overwritten.Parameter Type Description entityArxEntityThe record to create: its table and the attributes to write. Its RecordIdis set to the new id.cancellationTokenCancellationToken= defaultCancels the call. Task<ArxRecordId> CreateAsync(ArxEntity entity, ArxTransaction transaction, CancellationToken cancellationToken = default)As
CreateAsync, in an ARX transaction: the put is sent with the transaction's other writes at commit.Parameter Type Description entityArxEntityThe record to create: its table and the attributes to write. Its RecordIdis set to the new id.transactionArxTransactionThe ARX transaction to run in (from the provider's connection type). ARX doesn't commit or roll it back. cancellationTokenCancellationToken= defaultCancels the call. Task<IReadOnlyList<ArxRecordId>> CreateMultipleAsync(IReadOnlyList<ArxEntity> entities, CancellationToken cancellationToken = default)Inserts every entity, all or nothing, and returns their ids in list order: up to 100 in one
TransactWriteItems(conditions kept, across tables). More than 100 is ARX8001 unlessAllowPartial. The same key twice, or the same entity twice, is ARX1001.Parameter Type Description entitiesIReadOnlyList<ArxEntity>The records to create, all or nothing; their ids come back in the same order. cancellationTokenCancellationToken= defaultCancels the call. Task<IReadOnlyList<ArxRecordId>> CreateMultipleAsync(IReadOnlyList<ArxEntity> entities, ArxDynamoWriteOptions options, CancellationToken cancellationToken = default)As
CreateMultipleAsync, with write options.Parameter Type Description entitiesIReadOnlyList<ArxEntity>The records to create, all or nothing; their ids come back in the same order. optionsArxDynamoWriteOptionsOptions of the write: AllowPartiallets more than 100 items go in several transactions, one after another (not all or nothing).cancellationTokenCancellationToken= defaultCancels the call. Task<IReadOnlyList<ArxRecordId>> CreateMultipleAsync(IReadOnlyList<ArxEntity> entities, ArxTransaction transaction, CancellationToken cancellationToken = default)As
CreateMultipleAsync, in an ARX transaction.Parameter Type Description entitiesIReadOnlyList<ArxEntity>The records to create, all or nothing; their ids come back in the same order. transactionArxTransactionThe ARX transaction to run in (from the provider's connection type). ARX doesn't commit or roll it back. cancellationTokenCancellationToken= defaultCancels the call. Task<int> UpdateMultipleAsync(ArxEntity values, ArxFilterExpression filter, ArxFilterWriteOptions? options = null, CancellationToken cancellationToken = default)Sets
values' attributes on every item of its entity thatfiltermatches and returns how many were changed. DynamoDB has no update by a condition, so ARX finds the items with one Query (the filter must give the partition key of the table or of an index, as for RetrieveMultiple: a write never scans, ARX8001), then updates them by their keys in one transaction, each conditioned on the whole filter still matching it: an item changed in between so that it no longer matches is left as it is, and not counted.Parameter Type Description valuesArxEntityThe entity (EntityName) and the attributes to set: null removes an attribute. filterArxFilterExpressionThe items to change: conditions on the entity's own attributes, giving a partition key. optionsArxFilterWriteOptions?= nullAllRows for an empty filter; null for the defaults. cancellationTokenCancellationToken= defaultCancels the call. Task<int> UpdateMultipleAsync(ArxEntity values, ArxFilterExpression filter, ArxTransaction transaction, ArxFilterWriteOptions? options = null, CancellationToken cancellationToken = default)The update by a filter inside an ARX transaction: the items are found now and the count answered now; the writes go at commit, still conditioned on matching.
Parameter Type Description valuesArxEntityThe entity (EntityName) and the attributes to set: null removes an attribute. filterArxFilterExpressionThe items to change: conditions on the entity's own attributes, giving a partition key. transactionArxTransactionThe ARX transaction to run in (from the provider's connection type). ARX doesn't commit or roll it back. optionsArxFilterWriteOptions?= nullAllRows for an empty filter; null for the defaults. cancellationTokenCancellationToken= defaultCancels the call. Task<int> DeleteMultipleAsync(string entityName, ArxFilterExpression filter, ArxFilterWriteOptions? options = null, CancellationToken cancellationToken = default)Deletes every item of the entity that
filtermatches and returns how many went: one Query, then the deletes by key in one transaction, each conditioned on the filter still matching. The rules are the update's: a partition key given, at most 100 items, an empty filter ARX1001.Parameter Type Description entityNamestringThe entity to delete from. filterArxFilterExpressionThe items to delete: conditions on the entity's own attributes, giving a partition key. optionsArxFilterWriteOptions?= nullAllRows for an empty filter; null for the defaults. cancellationTokenCancellationToken= defaultCancels the call. Task<int> DeleteMultipleAsync(string entityName, ArxFilterExpression filter, ArxTransaction transaction, ArxFilterWriteOptions? options = null, CancellationToken cancellationToken = default)The delete by a filter inside an ARX transaction: found and counted now, deleted at commit.
Parameter Type Description entityNamestringThe entity to delete from. filterArxFilterExpressionThe items to delete: conditions on the entity's own attributes, giving a partition key. transactionArxTransactionThe ARX transaction to run in (from the provider's connection type). ARX doesn't commit or roll it back. optionsArxFilterWriteOptions?= nullAllRows for an empty filter; null for the defaults. cancellationTokenCancellationToken= defaultCancels the call. Task<IReadOnlyList<ArxRecordId>> CreateMultipleAsync(IReadOnlyList<ArxEntity> entities, ArxCreateMultipleOptions options, CancellationToken cancellationToken = default)Creates the items, all or nothing. DynamoDB's ids are always supplied, so the call is the same conditional puts as
CreateMultipleAsync; withReturnIdsfalse every id returned isNone.Parameter Type Description entitiesIReadOnlyList<ArxEntity>The records to create, all or nothing. optionsArxCreateMultipleOptionsReturnIds false when the ids aren't needed. cancellationTokenCancellationToken= defaultCancels the call. Task<IReadOnlyList<ArxRecordId>> CreateMultipleAsync(IReadOnlyList<ArxEntity> entities, ArxCreateMultipleOptions options, ArxTransaction transaction, CancellationToken cancellationToken = default)CreateMultiple with options inside an ARX transaction: the puts go at commit.
Parameter Type Description entitiesIReadOnlyList<ArxEntity>The records to create, all or nothing. optionsArxCreateMultipleOptionsReturnIds false when the ids aren't needed. transactionArxTransactionThe ARX transaction to run in (from the provider's connection type). ARX doesn't commit or roll it back. cancellationTokenCancellationToken= defaultCancels the call. Task<ArxEntity?> RetrieveAsync(string entityName, ArxRecordId id, ArxColumnSet? columns = null, CancellationToken cancellationToken = default)The item with this id (the one CreateAsync returned), or null.
Parameter Type Description entityNamestringThe table or view to read. idArxRecordIdThe record's id: the value Create returned, or a plain value of the declared id's type. columnsArxColumnSet?= nullThe columns to read; null or an empty set reads every column. The declared id is always read. cancellationTokenCancellationToken= defaultCancels the call. Task<ArxEntity?> RetrieveAsync(ArxEntity match, ArxRetrieveOptions? options = null, ArxDynamoReadOptions? read = null, CancellationToken cancellationToken = default)The item
match's key finds (every key attribute given), or null.Parameter Type Description matchArxEntityThe record to find: its table, and the values of the id, the declared key or the columns that find it. optionsArxRetrieveOptions?= nullHow the row is found and read (match, command timeout, lookup names); null for the defaults. readArxDynamoReadOptions?= nullDynamoDB's own read options: consistent reads (on by default), AllowScan,CaseSensitivePatterns; null for the defaults.cancellationTokenCancellationToken= defaultCancels the call. Task<ArxEntityCollection> RetrieveMultipleAsync(ArxQueryExpression query, ArxRetrieveOptions? options = null, CancellationToken cancellationToken = default)Runs a query: a Query of the table or an index when the criteria give the partition key with Equal, a Scan with
AllowScan. Ordered by the sort key only; paged by the cookie each page returns (PagingCookie), HasNextPage exact (ARX reads on until it knows). A written-sharded partition is read from every shard and merged by the sort key.Parameter Type Description queryArxQueryExpressionThe query: its row source, columns, criteria, links, order, paging and aggregates. optionsArxRetrieveOptions?= nullHow the row is found and read (match, command timeout, lookup names); null for the defaults. cancellationTokenCancellationToken= defaultCancels the call. Task<ArxEntityCollection> RetrieveMultipleAsync(ArxQueryExpression query, ArxDynamoReadOptions read, CancellationToken cancellationToken = default)As
RetrieveMultipleAsync, with DynamoDB's read options.Parameter Type Description queryArxQueryExpressionThe query: its row source, columns, criteria, links, order, paging and aggregates. readArxDynamoReadOptionsDynamoDB's own read options: consistent reads (on by default), AllowScan,CaseSensitivePatterns; null for the defaults.cancellationTokenCancellationToken= defaultCancels the call. Task<ArxEntityCollection> QueryPartitionAsync(ArxEntity keyValues, ArxPagingInfo? page = null, ArxDynamoReadOptions? read = null, CancellationToken cancellationToken = default)Reads an item collection of a single table: every item of the partition the entity's partition key gives (
keyValues' attributes), whatever its entity, each read back as the entity its type attribute names, in sort key order. A customer and its orders in one request. Paged by cookie withpage.Parameter Type Description keyValuesArxEntityAn entity whose attributes give the partition key (the sort key isn't used). pageArxPagingInfo?= nullThe page size and the cookie of the page to read; null for every item. readArxDynamoReadOptions?= nullDynamoDB's own read options: consistent reads (on by default), AllowScan,CaseSensitivePatterns; null for the defaults.cancellationTokenCancellationToken= defaultCancels the call. Task<ArxServerCheck> CheckServerAsync(CancellationToken cancellationToken = default)What the connected endpoint allows: it answers, and every table of the model exists (a missing one is a problem the check reports, by name). Every capability of this provider works on DynamoDB and DynamoDB Local alike, so the check finds no limits. Call it once at startup.
Parameter Type Description cancellationTokenCancellationToken= defaultCancels the call. Task<ArxExecuteResult> ExecuteAsync(ArxProcedureExpression procedure, ArxExecuteOptions? options = null, CancellationToken cancellationToken = default)Not offered: DynamoDB has no stored procedures or functions. Always ARX8001.
Parameter Type Description procedureArxProcedureExpressionThe procedure or function to call, with its arguments. optionsArxExecuteOptions?= nullOptions of the call (paging, command timeout); null for the defaults. cancellationTokenCancellationToken= defaultCancels the call. Task ValidateSchemaAsync(CancellationToken cancellationToken = default)Compares every model table with DynamoDB (
DescribeTable): the table exists, its key attributes and their types are the model's, and each of the model's indexes exists with its keys. Reports every difference at once (ARX5003). ARX never calls it by itself: run it at startup or in a health check.Parameter Type Description cancellationTokenCancellationToken= defaultCancels the call. Task<ArxEntity> RetrieveAsync(string entityName, ArxRecordId id, ArxTransaction transaction, ArxColumnSet? columns = null, CancellationToken cancellationToken = default)Reads the record with this id in an ARX transaction, or null. On SQL and MongoDB the read sees the transaction's own writes; DynamoDB sends a transaction's writes at commit, so a read there doesn't see them yet.
Parameter Type Description entityNamestringThe table or view to read. idArxRecordIdThe record's id: the value Create returned, or a plain value of the declared id's type. transactionArxTransactionThe ARX transaction to run in (from the provider's connection type). ARX doesn't commit or roll it back. columnsArxColumnSet?= nullThe columns to read; null or an empty set reads every column. The declared id is always read. cancellationTokenCancellationToken= defaultCancels the call. Task<ArxEntity> RetrieveAsync(ArxEntity match, ArxTransaction transaction, ArxRetrieveOptions? options = null, CancellationToken cancellationToken = default)Reads the one record the entity finds (by id, a key or columns) in an ARX transaction, or null.
Parameter Type Description matchArxEntityThe record to find: its table, and the values of the id, the declared key or the columns that find it. transactionArxTransactionThe ARX transaction to run in (from the provider's connection type). ARX doesn't commit or roll it back. optionsArxRetrieveOptions?= nullHow the row is found and read (match, command timeout, lookup names); null for the defaults. cancellationTokenCancellationToken= defaultCancels the call. Task<ArxEntityCollection> RetrieveMultipleAsync(ArxQueryExpression query, ArxTransaction transaction, ArxRetrieveOptions? options = null, CancellationToken cancellationToken = default)Runs the query in an ARX transaction and returns the records it finds.
Parameter Type Description queryArxQueryExpressionThe query: its row source, columns, criteria, links, order, paging and aggregates. transactionArxTransactionThe ARX transaction to run in (from the provider's connection type). ARX doesn't commit or roll it back. optionsArxRetrieveOptions?= nullHow the row is found and read (match, command timeout, lookup names); null for the defaults. cancellationTokenCancellationToken= defaultCancels the call. Task<ArxExecuteResult> ExecuteAsync(ArxProcedureExpression procedure, ArxTransaction transaction, ArxExecuteOptions? options = null, CancellationToken cancellationToken = default)Calls a procedure or function in an ARX transaction (ARX8001 where StoredProcedures isn't declared).
Parameter Type Description procedureArxProcedureExpressionThe procedure or function to call, with its arguments. transactionArxTransactionThe ARX transaction to run in (from the provider's connection type). ARX doesn't commit or roll it back. optionsArxExecuteOptions?= nullOptions of the call (paging, command timeout); null for the defaults. cancellationTokenCancellationToken= defaultCancels the call. Task<IArxBatchScope> BeginBatchAsync(ArxBatchOptions? options = null, CancellationToken cancellationToken = default)A batch scope: one ARX transaction whose writes are sent together at commit. DynamoDB has no savepoints, so a failed call rolls the whole scope back; asking for them (
Savepoints = true) is ARX8001.Parameter Type Description optionsArxBatchOptions?= nullThe scope's options; null for the defaults (no savepoints). cancellationTokenCancellationToken= defaultCancels the call. Task<int> UpdateAsync(ArxEntity entity, ArxUpdateOptions? options = null, CancellationToken cancellationToken = default)Updates the items the entity finds and returns how many were written. By default the entity's key attributes find one item (its RecordId counts for the id), and the result is 1.
Matchcan instead name other attributes (ArxMatch.Columns) when a partition key of the table or of an index can be built from them: ARX queries those items (at most 100) and updates each one, each write conditioned on it still matching, so the result can be more than 1. A match that no partition key covers is ARX8001: a write never scans. Only the attributes present are written (SET); an attribute set to null is removed (REMOVE). A missing item is ARX2002, never created. Key attributes are never written unlessAllowKeyChangemoves the item: a different key is a different item.Parameter Type Description entityArxEntityThe change: its table, the attributes to write (null clears a column; an attribute left out keeps its value), and the id, key or columns that find the row. optionsArxUpdateOptions?= nullHow the rows are found ( Match) and checked; null for the defaults (by id).cancellationTokenCancellationToken= defaultCancels the call. Task<int> UpdateAsync(ArxEntity entity, ArxTransaction transaction, ArxUpdateOptions? options = null, CancellationToken cancellationToken = default)As
UpdateAsync, in an ARX transaction (sent at commit; a missing item fails the commit).Parameter Type Description entityArxEntityThe change: its table, the attributes to write (null clears a column; an attribute left out keeps its value), and the id, key or columns that find the row. transactionArxTransactionThe ARX transaction to run in (from the provider's connection type). ARX doesn't commit or roll it back. optionsArxUpdateOptions?= nullHow the rows are found ( Match) and checked; null for the defaults (by id).cancellationTokenCancellationToken= defaultCancels the call. Task<int> UpdateAsync(ArxEntity entity, ArxDynamoWriteOptions writeOptions, ArxUpdateOptions? options = null, CancellationToken cancellationToken = default)As
UpdateAsync, with write options: withAllowKeyChange, an entity whose RecordId (the item) and id attribute (its new id) differ moves the item to its new key.Parameter Type Description entityArxEntityThe change: its table, the attributes to write (null clears a column; an attribute left out keeps its value), and the id, key or columns that find the row. writeOptionsArxDynamoWriteOptionsDynamoDB's own write options, such as AllowKeyChangeto move an item to a new key.optionsArxUpdateOptions?= nullHow the rows are found ( Match) and checked; null for the defaults (by id).cancellationTokenCancellationToken= defaultCancels the call. Task<int> UpdateAsync(ArxEntity entity, ArxTransaction transaction, ArxDynamoWriteOptions writeOptions, ArxUpdateOptions? options = null, CancellationToken cancellationToken = default)As
UpdateAsync, in an ARX transaction (a move is two of its writes).Parameter Type Description entityArxEntityThe change: its table, the attributes to write (null clears a column; an attribute left out keeps its value), and the id, key or columns that find the row. transactionArxTransactionThe ARX transaction to run in (from the provider's connection type). ARX doesn't commit or roll it back. writeOptionsArxDynamoWriteOptionsDynamoDB's own write options, such as AllowKeyChangeto move an item to a new key.optionsArxUpdateOptions?= nullHow the rows are found ( Match) and checked; null for the defaults (by id).cancellationTokenCancellationToken= defaultCancels the call. Task<int> UpdateMultipleAsync(IReadOnlyList<ArxEntity> entities, ArxUpdateOptions? options = null, CancellationToken cancellationToken = default)Updates every entity, all or nothing, in one
TransactWriteItems(up to 100; more with AllowPartial), and returns how many. If any item is missing, nothing changes and the call is ARX2002 naming it.Parameter Type Description entitiesIReadOnlyList<ArxEntity>The changes, all or nothing: each carries the attributes to write and what finds its row. optionsArxUpdateOptions?= nullHow the rows are found ( Match) and checked; null for the defaults (by id).cancellationTokenCancellationToken= defaultCancels the call. Task<int> UpdateMultipleAsync(IReadOnlyList<ArxEntity> entities, ArxDynamoWriteOptions writeOptions, ArxUpdateOptions? options = null, CancellationToken cancellationToken = default)As
UpdateMultipleAsync, with write options.Parameter Type Description entitiesIReadOnlyList<ArxEntity>The changes, all or nothing: each carries the attributes to write and what finds its row. writeOptionsArxDynamoWriteOptionsDynamoDB's own write options, such as AllowKeyChangeto move items to new keys.optionsArxUpdateOptions?= nullHow the rows are found ( Match) and checked; null for the defaults (by id).cancellationTokenCancellationToken= defaultCancels the call. Task<int> UpdateMultipleAsync(IReadOnlyList<ArxEntity> entities, ArxTransaction transaction, ArxUpdateOptions? options = null, CancellationToken cancellationToken = default)As
UpdateMultipleAsync, in an ARX transaction.Parameter Type Description entitiesIReadOnlyList<ArxEntity>The changes, all or nothing: each carries the attributes to write and what finds its row. transactionArxTransactionThe ARX transaction to run in (from the provider's connection type). ARX doesn't commit or roll it back. optionsArxUpdateOptions?= nullHow the rows are found ( Match) and checked; null for the defaults (by id).cancellationTokenCancellationToken= defaultCancels the call. Task<bool> DeleteAsync(string entityName, ArxRecordId id, CancellationToken cancellationToken = default)Deletes the item with this id; true when one went.
Parameter Type Description entityNamestringThe table to delete from. idArxRecordIdThe record's id: the value Create returned, or a plain value of the declared id's type. cancellationTokenCancellationToken= defaultCancels the call. Task<bool> DeleteAsync(string entityName, ArxRecordId id, ArxTransaction transaction, CancellationToken cancellationToken = default)Deletes by id in an ARX transaction: the item is read now, and deleted at commit (a missing item then fails the commit).
Parameter Type Description entityNamestringThe table to delete from. idArxRecordIdThe record's id: the value Create returned, or a plain value of the declared id's type. transactionArxTransactionThe ARX transaction to run in (from the provider's connection type). ARX doesn't commit or roll it back. cancellationTokenCancellationToken= defaultCancels the call. Task<int> DeleteAsync(ArxEntity entity, ArxDeleteOptions? options = null, CancellationToken cancellationToken = default)Deletes the items the entity finds and returns how many went: by its key (1, or 0 when there was none), or by the attributes
Matchnames when a partition key of the table or of an index can be built from them (at most 100, each delete conditioned on still matching). With RequireSingleRow, none is ARX2002.Parameter Type Description entityArxEntityThe record to delete: its table and the id, key or columns that find it. optionsArxDeleteOptions?= nullHow the rows are found ( Match) and checked; null for the defaults (by id).cancellationTokenCancellationToken= defaultCancels the call. Task<int> DeleteAsync(ArxEntity entity, ArxTransaction transaction, ArxDeleteOptions? options = null, CancellationToken cancellationToken = default)As
DeleteAsync, in an ARX transaction.Parameter Type Description entityArxEntityThe record to delete: its table and the id, key or columns that find it. transactionArxTransactionThe ARX transaction to run in (from the provider's connection type). ARX doesn't commit or roll it back. optionsArxDeleteOptions?= nullHow the rows are found ( Match) and checked; null for the defaults (by id).cancellationTokenCancellationToken= defaultCancels the call. Task<int> DeleteMultipleAsync<TId>(string entityName, IReadOnlyCollection<TId> ids, CancellationToken cancellationToken = default)Deletes the records with these ids, all or nothing, and returns how many existed. Ids that match nothing aren't an error: the count shows them. Duplicates count once. An empty list returns 0 without touching the database. One method for every id type (1.0.0-rc.1): a list of
long,int,Guid,stringorArxRecordId; another element type is ARX1007 UnsupportedValueType.Parameter Type Description entityNamestringThe table to delete from. idsIReadOnlyCollection<TId>The ids of the records to delete; ids that match nothing are left out of the count. cancellationTokenCancellationToken= defaultCancels the call. Task<int> DeleteMultipleAsync(IReadOnlyList<ArxEntity> entities, ArxDeleteOptions? options = null, CancellationToken cancellationToken = default)Deletes the items the entities' keys find, all or nothing, and returns how many went: one consistent read of the keys, then the deletes of the items found in one transaction (each conditioned on still existing). With RequireSingleRow every entity must find its item (ARX2002, nothing deleted).
Parameter Type Description entitiesIReadOnlyList<ArxEntity>The records to delete, all or nothing, each found by its id or by the match's columns. optionsArxDeleteOptions?= nullHow the rows are found ( Match) and checked; null for the defaults (by id).cancellationTokenCancellationToken= defaultCancels the call. Task<int> DeleteMultipleAsync(IReadOnlyList<ArxEntity> entities, ArxTransaction transaction, ArxDeleteOptions? options = null, CancellationToken cancellationToken = default)As
DeleteMultipleAsync, in an ARX transaction.Parameter Type Description entitiesIReadOnlyList<ArxEntity>The records to delete, all or nothing, each found by its id or by the match's columns. transactionArxTransactionThe ARX transaction to run in (from the provider's connection type). ARX doesn't commit or roll it back. optionsArxDeleteOptions?= nullHow the rows are found ( Match) and checked; null for the defaults (by id).cancellationTokenCancellationToken= defaultCancels the call.
Usage
A line from a verified sample; the full, runnable code is on its page.
var service = new ArxDynamoDbService(client, model);Create one record, in either design, scenario 1
Used in:
- Create one record, in either designCreate
- Catch the errors a create meetsCreate
- Store every kind of valueCreate
- Catch an injection attemptCreate
- Create in an ARX transactionCreate
- Set up the service from DynamoDB's tablesCreate
- Use attributes named outside the name rule, through aliasesCreate
- Create many records in one callCreateMultiple
- Spread a hot partition with write shardingCreateMultiple
- Update one recordUpdate
- How an update finds its itemUpdate
- Catch an injection attemptUpdate
- Detect a change made since the readUpdate
- Update in a batch scopeUpdate
- Set up the service from DynamoDB's tablesUpdate
- Move an item to a new keyUpdate
- Update many records in one callUpdateMultiple
- Update or delete every item a filter matchesUpdateMultiple
- Delete one recordDelete
- How a delete finds its itemsDelete
- Catch an injection attemptDelete
- Replace a record in a transactionDelete
- Set up the service from DynamoDB's tablesDelete
- Delete many records in one callDeleteMultiple
- Retrieve one recordRetrieve
- Set up the service from DynamoDB's tablesRetrieve
- Retrieve many recordsRetrieveMultiple
- Page through resultsRetrieveMultiple
- A customer and its orders in one requestRetrieveMultiple
- Orders by status, through an indexRetrieveMultiple
- Catch an injection attemptRetrieveMultiple
- Scan when you mustRetrieveMultiple
- Protect paging cookiesRetrieveMultiple
- The sample application