Amazon DynamoDB · Types · Queries

ArxRowSource

Definition

Namespace
ARX.SDK.Query
Package
ARX.SDK
C#
public sealed class ArxRowSource

What a query reads from: a table or view by name, or a function that returns rows, with its arguments. Immutable: Returns and AllowWrites return a new source.

Constructor

No public constructor: create one with:

  • ArxRowSource.Table(string name)

    A table or view (on PostgreSQL also a materialized view or foreign table).

    Parameter Type Description
    namestringThe table or view (on PostgreSQL also a materialized view or foreign table), or schema.name.
  • ArxRowSource.Function(string name)

    A function with no arguments.

    Parameter Type Description
    namestringThe function, or schema.function.
  • ArxRowSource.Function(string name, params (string Name, object? Value)[] arguments)

    A function with named arguments: Function("fn", ("p_region", "NL"), ("p_active", true)).

    Parameter Type Description
    namestringThe function, or schema.function.
    argumentsparams (string Name, object? Value)[]Each argument by its parameter's name, with its value.
  • ArxRowSource.Function(string name, params object?[] arguments)

    A function with positional arguments: Function("fn", "NL", true).

    Parameter Type Description
    namestringThe function, or schema.function.
    argumentsparams object?[]The arguments, in the function's parameter order.

Properties

  • ArxRowSourceKind Kind { get; }

    A table (anything read by name) or a function called with arguments.

  • string Name { get; }

    The table, view or function name, optionally schema-qualified (reporting.v_sales). Validated by the provider.

  • IReadOnlyList<ArxFunctionArgument> Arguments { get; }

    The function's arguments, in order. Empty for a table.

  • IReadOnlyList<ArxResultColumn> ResultColumns { get; }

    The declared result columns of a function returning untyped rows; empty otherwise.

  • bool AllowsWrites { get; }

    False (the default): a function is read in a read-only transaction when ARX owns the connection, so a function that writes is refused. Inside an ArxTransaction, a batch scope or a connection the caller passes in, the read runs in that transaction as it is: a function that writes does write there, since ARX can't make the caller's transaction read-only. True after AllowWrites.

  • bool IsFunction { get; }

    True for a function row source.

Methods

  • ArxRowSource Returns(params (string Name, Type Type)[] columns)

    Declares the result columns of a function that returns untyped rows (RETURNS SETOF record).

    Parameter Type Description
    columnsparams (string Name, Type Type)[]The function's result columns and their .NET types, in order.
  • ArxRowSource AllowWrites()

    Lets a function read change data: no read-only transaction around it. Use only for functions you trust.