MySQL · Types · Finding the rows
ArxUpdateOptions
Definition
- Namespace
ARX.SDK.Services- Package
ARX.SDK
public sealed class ArxUpdateOptionsOptions for Update and UpdateMultiple.
Properties
ArxMatch Match { get; init; }How the rows are found;
Idby default.bool RequireSingleRow { get; init; }When true, every entity must change exactly one row: none is ARX2002 RecordNotFound, more than one is ARX2003 MultipleRecordsMatched, and either way nothing is changed. Off by default: an update by custom columns may change many rows, and the call returns how many.
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
- Soft delete: close and restore an accountDelete