PostgreSQL · Types · Finding the rows

ArxMatch

Definition

Namespace
ARX.SDK.Services
Package
ARX.SDK
C#
public sealed class ArxMatch

How 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

C#

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") });

Update one record, scenario 4

Used in: