Table of Contents

Interface ITupleRenderer

Namespace
NextORM.Core
Assembly
nextorm.core.dll

A dialect's renderer for row values / composite tuples: the constructor (PostgreSQL ROW(a, b), ClickHouse tuple(a, b)) and, when supported, positional element access on a server-side row (PostgreSQL (row).fN, ClickHouse tupleElement(row, N)). The object's presence is the capability: a dialect that returns null rejects the tuple surface.

public interface ITupleRenderer
Extension Methods

Methods

RenderConstructor(IReadOnlyList<string>)

Renders a row constructor from its already-rendered field expressions.

string RenderConstructor(IReadOnlyList<string> fields)

Parameters

fields IReadOnlyList<string>

Returns

string

RenderElement(string, int)

Renders access to the one-based oneBasedIndex element of a server-side row, or null when the dialect has no positional access (MySQL/MariaDB/SQLite). When null, an inline constructor's element access is folded to the argument instead.

string? RenderElement(string row, int oneBasedIndex)

Parameters

row string
oneBasedIndex int

Returns

string

RenderInValues(IReadOnlyList<string>)

Renders the right-hand value list of a row membership test from the already-rendered row constructors, including the wrapping parentheses. The default is the ANSI row list ((...), (...)) used by MySQL/MariaDB/PostgreSQL/ClickHouse; SQLite overrides it with the (VALUES (...), (...)) grammar.

string RenderInValues(IReadOnlyList<string> rows)

Parameters

rows IReadOnlyList<string>

Returns

string