SQL Server · Types · Finding the rows
ArxMatch
Definition
- Namespace
ARX.SDK.Services- Package
ARX.SDK
public sealed class ArxMatchHow an update or delete finds its rows: Id (the default), Key or Columns. The values to match come from the entity: its RecordId or id attribute for Id, the attributes with the key's or columns' names otherwise. Match columns are never written. Immutable.
Constructor
No public constructor: create one with:
ArxMatch.Key(params string[] columns)By the declared business key with these columns (in any order). A key the table doesn't declare is refused (ARX1001). On DynamoDB the model declares each entity's key (its partition and sort key attributes), so that key needs no
.Key(...)of its own there; on the other providers declare it in the schema catalog, so code that moves from DynamoDB adds the.Key(...).Parameter Type Description columnsparams string[]The columns of a key the table declares, in any order. ArxMatch.Columns(params string[] columns)By these columns, declared or not. May match many rows: the call returns how many it changed or deleted.
Parameter Type Description columnsparams string[]Any columns of the table; their values come from the entity's attributes.
Properties
static ArxMatch Id { get; }By the table's declared id column (the default). A table declared NoIdColumn can't be matched by id.
ArxMatchKind Kind { get; }How the rows are found.
IReadOnlyList<string> ColumnNames { get; }The key's or columns' names, as given; empty for
Id.
Usage
A line from a verified sample; the full, runnable code is on its page.
await service.UpdateAsync(newPrice, new ArxUpdateOptions { Match = ArxMatch.Key("region", "sku") });Used in:
- Update one recordUpdate
- Find rows by id, by key or by columnsUpdate
- Update without a catalogUpdate
- Turn update errors into messagesUpdate
- Change prices found by a compound keyUpdate
- Catch an SQL injection attempt on updateUpdate
- Update on a preloaded schema: keys only, data types, StrictUpdate
- Put accounts on hold (selection set, by key)UpdateMultiple
- Reprice 20,000 products from a feedUpdateMultiple
- Stock counts in batches: one transaction, a failed batch skippedUpdateMultiple
- Delete by key, by compound key, by columnsDelete
- Delete without a catalogDelete
- Remove a contact by id or by emailDelete
- Undo an import of 5,000 contactsDelete
- A referenced record: ARX3002, then delete in orderDelete
- Soft delete: close and restore an accountDelete
- Catch an SQL injection attempt on deleteDelete
- Replace an order's lines: delete, create, update, all or nothingDelete
- Delete on a preloaded schema: keys only, StrictDelete
- Remove the contacts a user selectedDeleteMultiple
- Find a record by id, key or columnsRetrieve
- Retrieve without a catalogRetrieve