Namespace NextORM.Core
Classes
- AggregateClassification
Public classification of an expression as an aggregate (vs. scalar/window). Single implementation shared by the engine and external operators; aggregate
FILTER/DISTINCTarguments stay opaque. No duplicated magic-name list and no registry.
- AliasFromProjectionVisitor
Derives column aliases from a projection expression.
- ArrayJoinProjection<TEntity, TElement>
Projection exposed by
ArrayJoinElement/LeftArrayJoinElement: Item1 is the original query entity and Element the value expanded by the boundARRAY JOIN. Use it to reference both inSelect/Where, for exampleFrom<IArrayEntity>().ArrayJoinElement(e => e.Tags).Select(p => new { p.Item1.Id, Tag = p.Element }).
- BaseExpressionVisitor
Base class for the expression visitors: holds the dialect, column/alias/parameter providers, parameter list and logging state shared by the derived visitors.
- BatchBuilder
Collects the statements of a batch: side-effecting statements (materialisations and DML) followed by one or more result-bearing queries. A single result can be added with the terminal Query<TResult>(QueryCommand<TResult>); several results can be added with AddQuery<TResult>(QueryCommand<TResult>) and then materialised together with Execute() (one network round trip, every result set read eagerly). Every statement is rendered with one shared parameter sequence (captured variables are prefixed per statement), so placeholder names never collide.
- BatchExtensions
Entry point for executing several statements as one batch (one round trip, one server session). A batch is useful when a statement depends on a session-scoped side effect of an earlier one — a materialisation (
CREATE TEMPORARY TABLE ... AS SELECT) or a DML statement (INSERT,UPDATE,DELETE) followed by a query reading the result: under a connection-level pooler that reassigns the backend per transaction (PgBouncer intransactionmode) two separate commands can be routed to different backends, so the read fails withrelation does not exist. One batch keeps them on the same backend.A provider capable of a single-round-trip batch opts in through SupportsBatch (PostgreSQL, SQL Server, MySQL, MariaDB and SQLite). The in-memory context has no batch executor, so CreateBatchBuilder(IDataContext) rejects it immediately; a database-backed provider without the capability throws NotSupportedException when the batch renders instead of silently degrading to separate statements.
- BatchQuery<TResult>
Terminal of a batch: materialises the rows of the batch's result-bearing query. The whole batch — the preceding statements and this query — executes as one round trip.
- BatchResult
The eagerly materialised result sets of a batch built with AddQuery<TResult>(QueryCommand<TResult>) and executed with Execute() or ExecuteAsync(CancellationToken). Every set is fully buffered in memory, so the instance owns no reader or connection and is not disposable. The result object itself enumerates its result sets:
foreach (var set in result)orawait foreach (var set in result)yields a ResultSet cursor per set. The legacy Read<TResult>() path reads sets positionally.
- BuildSqlCommandException
Thrown when the SQL text for a command cannot be generated.
- BulkInsertBuilder<TEntity>
Builder for a bulk insert over a mapped entity, started with
CreateBulkInsertBuilder<TEntity>(passing a BulkInsertOptions or a BulkInsertOptionsBuilder callback). Supply the rows with Values(IEnumerable<TEntity>) and finish with a terminal. It writes through the provider's native bulk API where one exists, and through a chunked parameterisedINSERT ... VALUESotherwise; the write shape is configured through BulkInsertOptions.There is deliberately no change tracking: every terminal issues one explicit bulk write, as with linq2db
BulkCopy. The builder is single-use and the source is read once. Unlike InsertBuilder<TEntity>, the native path does not return generated keys — request ReturningKey<TKey>() or Returning<TResult>(Expression<Func<TEntity, TResult>>) for that (it forces the portable,RETURNING/OUTPUT-capable path).
- BulkInsertOptions
Options for a bulk insert started with
CreateBulkInsertBuilder. Immutable and safe to reuse; build one with BulkInsertOptionsBuilder or set the properties directly. Providers that cannot express a requested option reject it with NotSupportedException when the write runs, and invalid values are rejected as soon as the options are attached to a builder.
- BulkInsertOptionsBuilder
Fluent builder for BulkInsertOptions. Every setter validates immediately and returns the builder, so an invalid option fails at the call site rather than at execution.
- BulkInsertReturningBuilder<TEntity, TResult>
Fluent terminal for a bulk insert that returns a projection (or the generated keys) of every written row through the provider's
RETURNING/OUTPUTform, started with ReturningKey<TKey>() or Returning<TResult>(Expression<Func<TEntity, TResult>>).This is the portable, batch path: the native bulk API cannot return rows, so the set is written as a sequence of returning
INSERT ... VALUESstatements. It requires a provider withRETURNINGorOUTPUT(PostgreSQL, SQLite 3.35+, MariaDB 10.5+, SQL Server); MySQL and ClickHouse reject it with a clear NotSupportedException. The result order is not guaranteed to match the source order.
- ClickHouseBulkInsertOptions
ClickHouse native
InsertBinaryAsyncoptions. A group with every value left null requests nothing; supplying it on another provider is rejected when the target provider is known.
- ClickHouseFunctions
ClickHouse-only SQL surface: the
argMin/argMaxaggregates, the distinct-countuniq/uniqExact/uniqCombined/uniqHLL12aggregates, the parameterisedquantile(level)(value)/quantiles(level...)(value)family withmedian, thetopK(k)(value)/topKWeighted(k)(value, weight)aggregates, theanyLastrow-picking aggregate, the sequence/funnel aggregateswindowFunnel/retention/sequenceMatch, the frame-respectinglagInFrame/leadInFramewindow functions, the multi-branchmultiIfconditional (through when<T>(bool, T?)/otherwise<T>(T?)), the string-JSONJSONExtract*/JSONHasandvisitParamExtract*families plus the JSONPathjson_value/json_query/json_existsscalars and the native-JSONJSONAllPaths/JSONAllPathsWithTypes/toJSONStringfunctions, the merge-patch, validation and typed-extraction additions (JSONMergePatch,JSONArrayLength,JSONDynamicPaths/JSONSharedDataPathswith theirWithTypessiblings,JSONKey,JSONExtractKeysAndValuesRaw,JSONExtractUInt,isValidJSONand thesimpleJSONExtract*family), the dictionary functions, the-Ifaggregate combinator, the distributedglobal_inpredicate, thenumbers/numbers_mtandzeros/zeros_mttable functions (plusgenerateRandom) and the server/cluster table functions (url/s3/file/remote/remoteSecure/cluster/clusterAllReplicas), the date conversion/part surface (toDate/toDateTime/toDate32, thetoYear/... accessors,toStartOf*,toMonday,toYYYYMM/toYYYYMMDD,toUnixTimestamp), and the array functions over array columns and expressions (arrayJoin,length,has,indexOf,hasAny/hasAll,startsWith/endsWith/hasSubstr,arrayStringConcat,splitByChar,arraySort,arrayReverse,arrayDistinct,range,arrayEnumerate,arrayCumSum,arraySlice,arrayPushBack), the higher-order (lambda) array functions (arrayMap,arrayFilter,arrayExists,arrayAll,arrayCount,arrayFirst*,arrayLast*) plus the array-returning aggregatesgroupArray/groupUniqArray, the string search/edit-distance surface (overlay,initcap,soundex, thebase64Encode/base64Decodeandhex/unhexpairs,editDistance/jaroSimilarity/byteHammingDistance,substringIndex,countSubstrings,extractGroupsand the fournormalizeUTF8*forms), and the numeric functionslog2/cbrt/exp2/exp10, the special-function surfaceerf/erfc/lgamma/tgamma/sigmoid/sqr/hypot, the integral helpersgcd/lcm/intDiv/intExp2/intExp10and theisFinite/isInfinite/isNaNpredicates, and the rounding family (roundBankers,roundDown,roundDuration,roundAge,roundToExp2) with its vendor bucket tables and half-to-even rule, and the date/time family (makeDate/makeDate32/makeDateTime,now64/nowInBlock,timeSlot/timeSlots, the sub-hourtoStartOf*truncations andtoStartOfInterval, the ISO/week/year-week accessors,toModifiedJulianDay,age/dateName,serverTimezone/timezoneOf/timezoneOffset,toTime,timestampand thefromUnixTimestamp*forms), with three tested CLR-shape refusals (fromUTCTimestamp,toTime64,fromUnixTimestamp64Nano). The catalog's numeric operator forms (plus/minus/multiply/divide/negate) and the constanteare deliberately not members: they are the portable CLR operators and the E constant, which the shared translator renders as the identical ClickHouse function/expression. Exposed through ClickHouse; every member is gated by a capability flag and rejected by providers that do not opt in.
- ClickHouseFunctions.MultiIfBranch<T>
A single branch of a multi_if<TResult>(params MultiIfBranch<TResult>[]) call: a condition with its result (when<T>(bool, T?)) or the final else value (otherwise<T>(T?)). Only ever produced by the compiler while building an expression tree; the dialect renders it as an argument of
multiIf.
- CollationAttribute
Declares the database collation of a mapped string property. The collation is applied to the column in collation-sensitive operations of generated queries (comparison,
LIKE,ORDER BY,GROUP BY), so the column follows the declared collation instead of the database default. Requires a provider that supports a per-expressionCOLLATEclause (see SupportsCollation); ClickHouse has none and rejects a collated column.
- CommonFunctions
Surface of SQL functions and predicates that can be used inside query expressions. The SQL providers evaluate the members through the expression translator; the in-memory provider rewrites the small subset that has a native CLR equivalent.
- CorrelatedQueryExpressionVisitor
Collects the outer references of a correlated subquery.
- CreateTableOptions
Options for materialising a query into a table with TempTableExtensions. Providers that cannot express a given option reject it with NotSupportedException when the SQL is built.
- CreateTableOptionsBuilder
Fluent builder for CreateTableOptions. Every setter returns the builder, so options can be composed inline at a materialisation terminal, for example
ToTable("t", o => o.DropExisting()). A rule that depends on the target form (temporary vs persistent) is checked when the statement is built; the contradictory combination is already rejected by Build().
- CsvStreamOptions
Options controlling the dialect of the CSV written by
QueryCommandExtensions.WriteCsv/WriteCsvAsync(and the EntityBuilder<TEntity> overloads).
- CteDefinition
A single common table expression: the name it is declared under, the query that produces it and whether it is recursive (a recursive CTE body may reference its own name).
- CteQuery
Fluent scope that collects the CTE declarations of a query. With(string, QueryCommand) / WithRecursive(string, QueryCommand, int?) add a definition and return a new scope (declarations are immutable), and From(string) starts a query whose
fromis one of the declared CTEs while carrying every declaration into the resulting command.
- CteReference
Non-generic identity of a typed self-reference handed to the step callback of the recursive
AsRecursiveCteoverloads onQueryCommand<TResult>.Creation is non-public: a reference is produced only by the recursive-CTE factory and is bound to the anchor's readable column shape. Identity is the non-public NextORM.Core.CteReference.Owner token, not the declared Name — two references carrying the same name but a different owner are not interchangeable.
- CteReference<TResult>
Typed self-reference of a recursive common table expression: the step callback received this instance and reads the anchor's rows through From<TResult>(IDataContext, CteReference<TResult>). A self-reference is valid only while the factory is running that definition's step; using it afterwards (a captured or foreign reference) is rejected before any database command is built.
- Cte<TResult>
An immutable, reference-identified descriptor of a common table expression whose rows carry the projection shape
TResult.Created from a query with AsCte(string) and read with From<TResult>(IDataContext, Cte<TResult>). The descriptor is a typed projection source, not a mapped entity: typed member reads resolve to the defining query's output columns, so a whole-entity
TResultdoes not imply a table mapping.The descriptor holds the defining command and its declaration set internally; identity is by reference, there is no structural or name equality. The defining QueryCommand is not snapshotted, matching the existing CTE lifecycle contract.
Recursion is not part of this API — it declares an ordinary CTE only. The legacy
With/WithRecursive/From(string)/From(CteDefinition)string APIs are unchanged and remain the way to read a CTE by name or to build a recursive CTE.
- DataContext
Base class for database-backed contexts. Owns the connection lifecycle, the shared query-plan cache and the execution/planning collaborators, and exposes the terminal operators over prepared commands. Providers derive from it and supply the SQL dialect, the connection factory and parameter creation.
- DataContextBuilder
Configures and creates an IDataContext.
- DataContextCache
Process-wide caches shared by every context, SQL and in-memory alike. This is the single source of truth for entity metadata, select lists and compiled expression delegates.
- DataContextException
Base type for errors raised by a IDataContext.
- DataContextExtensions
Provider-independent helpers and convenience overloads for IDataContext. These used to be default interface methods; keeping them outside the interface leaves the provider-implemented contract (the role interfaces) free of engine-independent behavior.
- DbPreparedQueryCommand<TResult>
Prepared query command backed by an ADO.NET IDataRecord reader.
Immutable preparation data (mapper, reader behavior, SQL text, parameter flags, refresh recipe and the planned batch) lives on this object. Everything that depends on the connection an execution runs on lives in a NextORM.Core.CommandState held by a weak table keyed on that connection, so one prepared command can be executed concurrently through contexts on distinct connections while each connection keeps its own command, parameter positions and execution lease. Nothing here holds a connection, a transaction, a context or a reader.
- DecimalPrecisionAttribute
Declares the decimal precision and scale of a mapped decimal property. The pair is read by IPropertyMetadata (DecimalPrecision and DecimalScale) and used where a provider needs the declared precision/scale, such as the column metadata of a table-valued parameter.
The declared domain is provider-neutral and bounded by SQL Server's maximum: precision must be between 1 and 38, and scale between 0 and the precision. A provider without a native decimal precision (for example ClickHouse's
Decimal(P, S)) honours the same pair; a provider that does not need it keeps its default. The pair is validated against the type actually bound for the column: a non-decimal model mapped through a value converter to decimal is accepted, while a decimal model mapped to a non-decimal representation (a converter to string or a JSON column) is rejected. An out-of-range pair throws ArgumentOutOfRangeException; a pair declared on a non-decimal bound type or a partially declared pair throws InvalidOperationException.
- DefaultAliasProvider
Default IAliasProvider that hands out deterministic aliases (
t1,t2, ...) in the order sources are registered.
- DefaultColumnsProvider
Default IColumnsProvider that tracks the column sources of a query in registration order and resolves lambda parameters to alias indexes within the current scope.
- DefaultParameterProvider
Default IParameterProvider that hands out sequentially numbered parameter names.
- DeleteBuilder<TEntity>
Fluent builder for a
DELETEstatement, started with CreateDeleteBuilder<TEntity>(IDataContext, Action<EntityMetadataBuilder<TEntity>>?). The rows to remove are selected either by a predicate (Where(Expression<Func<TEntity, bool>>)) or explicitly as the whole table (All()); both render a parameterisedDELETE FROM <table> [WHERE ...]. There is deliberately no change tracking: the terminal issues exactly one explicit command.
- DeleteJoinBuilder<TProjection>
Fluent starter for the row-returning form of a multi-table
DELETE, produced by CreateDeleteJoinBuilder<T1, T2>(JoinedEntityBuilder<T1, T2>). It switches an already-built joined query to the returning terminal through Returning() or Returning<TResult>(Expression<Func<TProjection, TResult>>); the target is the first table of the join chain and the removed-row values come from every joined table the selector reads. The whole-projection (identity) form returns every returnable mapped property of every item slot, in slot order, so a self-join of one type keeps itsItem1/Item2values distinct (a repeated CLR type stays separated by slot).PostgreSQL only, on INNER joins and for arities 2–8; every other provider and every outer join rejects. The same builder is also accepted as a data-modifying CTE body through With<TProjection, TResult>(IDataContext, string, DeleteJoinReturningBuilder<TProjection, TResult>).
- DeleteJoinReturningBuilder<TProjection, TResult>
Fluent terminal for a multi-table
DELETEthat returns the removed rows through PostgreSQL'sDELETE ... USING ... RETURNINGform, started with CreateDeleteJoinBuilder<T1, T2>(JoinedEntityBuilder<T1, T2>) and switched to a returning selector with Returning<TResult>(Expression<Func<TProjection, TResult>>). The whole-projection (identity) form returns every returnable mapped property of every item slot, in slot order, so a self-join of one type keeps itsItem1/Item2values distinct (a repeated CLR type stays separated by slot); explicit projections are unchanged and no call adds aRETURNINGlist implicitly. The returned rows are materialised with the same projection pipeline as a query; every terminal reads the result through Single() or ToList(). Identity is PostgreSQL only, on INNER joins and for arities 2–8; every other provider and every outer join rejects. The same builder is also accepted as a data-modifying CTE body by With<TProjection, TResult>(IDataContext, string, DeleteJoinReturningBuilder<TProjection, TResult>).
- DeleteReturningBuilder<TEntity, TResult>
Fluent terminal for a
DELETEthat returns the removed rows through the provider'sRETURNING/OUTPUTform, started with Returning() or Returning<TResult>(Expression<Func<TEntity, TResult>>). The returned rows are materialised with the same projection pipeline as a query; every terminal reads the result through Single() or ToList().
- DurationAttribute
Declares how a TimeSpan property is stored. On a provider with a native duration type (PostgreSQL
interval, MySQL/MariaDBTIME) the unit is ignored and the value is stored natively; on a provider without one (SQL Server, SQLite, ClickHouse) the value is stored in an integer column in Unit, defaulting to Ticks.
- DynamicColumnsAttribute
Marks a writable property of an entity as the store that receives the row's columns which are not mapped to a declared member. The property must be assignable from Dictionary<TKey, TValue> with string keys and object values.
- EntityBuilder
Fluent query builder over a table addressed by name (
TableAliasmode); created byIDataContext.From("table").
- EntityBuilderExtensions
Terminal operators for EntityBuilder<TEntity>. They are extension methods so the builder itself stays a focused query-shaping type; each one simply forwards to the command it builds. Call sites are unchanged (instance-style invocation still resolves here).
- EntityBuilder<TEntity>
Fluent, immutable query builder over a mapped entity type; created by
IDataContext.From<TEntity>().
- EntityExtensions
Convenience extension methods over the query builders.
- EntityMetadataBuilder<T>
Fluent builder, passed to
From<T>(...), that declares the table name and column mappings of an entity type.
- EntityPropertyBuilder<T>
Fluent builder for a single property mapping, returned by Property(Expression<Func<T, object>>).
- EnumToStringConverter<TEnum>
A built-in ValueConverter<TModel, TProvider> that stores an enum as its name (ToString()) in a text column and parses it back with Parse<TEnum>(string). It is the ready-made equivalent of a hand-written
ValueConverter<TEnum, string>, so it can be attached with ValueConverterAttribute orHasConversionand needs no custom class.
- ExpressionCache<T>
A concurrent cache keyed by ExpressionKey, used to reuse a compiled artifact per structurally equivalent expression.
- ExpressionExtensions
Helpers for rewriting and inspecting expression trees.
- ExpressionKey
Equality wrapper around an Expression that uses the query registry's
ExpressionPlanEqualityComparer, so two expressions that describe the same query plan hash and compare equal even when they are different object instances. The hash is computed once at construction because both inputs are immutable.
- ExpressionPlanEqualityComparer
Compares expressions structurally so that logically identical queries share a cached plan. Owns the thread-static hashing visitor used by
GetHashCode.
- ExtremeRowDescription
A side-effect-free description of a prepared
SelectWhereMax/SelectWhereMincommand, handed to CanRender(ExtremeRowDescription) so a dialect can decide - before any SQL, alias or parameter side effect - whether its native strategy applies. An empty Groups list means the global form; a non-empty one the grouped form.
- ExtremeRowRenderColumn
One prepared extreme-row column as the dialect's optional IExtremeRowRenderer reasons about it. It carries only shape facts (CLR type, nullability, whether the key is a direct mapped column) and never the expression, command or build context.
- ExtremeRowRenderRequest
The already-prepared inputs of one native extreme-row render: the filtered source SQL, the canonical payload aliases the returned source must expose, and the ordered key/group aliases that source exposes for the native construct.
- FromExpression
Identifies a query source: a table name, an entity type, a subquery, a table-valued function, a
PIVOT/UNPIVOT, or one of the in-memory-only source kinds.
- FromExpressionPlanEqualityComparer
Compares and hashes query sources for plan-cache purposes: table names by value, and subqueries, table functions, pivots and xml row-sets structurally.
- FromOptions
Per-query options for the primary
FROMsource, configured at query start through From<T>(IDataContext, Action<FromOptions>, Action<EntityMetadataBuilder<T>>?) (or the raw-tableFrom(string, Action<FromOptions>)overload). The values are copied into the returned builder, so the options object is not retained.
- IEqualityComparerExtensions
Extension methods that compare collections element-wise with an IEqualityComparer<T> or IValueEqualityComparer<T>.
- InMemoryCommandBuilderExtensions
Extension methods that register the data an
EntityBuilder<TEntity>queries when it runs on the in-memory provider (InMemoryDataContext). Calls on any other provider are no-ops.
- InMemoryCompiledQuery<TResult, TEntity>
Compiled query over an in-memory entity set.
- InMemoryDataContext
In-memory IDataContext implementation that evaluates LINQ queries over Data without a database. Used for unit testing and for querying materialised object graphs with the same operators as the SQL contexts.
- InMemoryEnumeratorAdapter<TResult, TEntity>
Adapts an asynchronous IAsyncEnumerator<T> of source rows to the query's
TResultprojection. Used when an in-memory subquery is backed by an async source that has no synchronous counterpart; it applies the predicate and, when requested, theDISTINCTfilter as rows are pulled.
- InMemoryEnumerator<TResult, TEntity>
Enumerates the results of an in-memory query, mapping each
TEntitysource row to aTResultprojection. Supports both asynchronous and synchronous consumption (the data is already in memory) and, whenDISTINCTwas requested, de-duplicates projected values as they are produced.
- InMemoryPreparedQueryCommand<TResult>
A prepared in-memory query: the compiled query together with the delegate that (re)creates its enumerator and a cache of the per-call resolver.
- InsertBuilder<TEntity>
Fluent builder for an
INSERTstatement over a mapped entity, started with CreateInsertBuilder<TEntity>(IDataContext, Action<EntityMetadataBuilder<TEntity>>?). It collects the columns and values, renders them as a parameterised statement through the active dialect and executes it on the context.There is deliberately no change tracking: every terminal (Insert(), Returning(), ReturningIdentity<TKey>(), ReturningKey<TKey>()) issues one explicit command, as with linq2db or
ExecuteNonQuery. The builder is single-use: values accumulate until a terminal runs.
- InsertReturningBuilder<TEntity, TResult>
Fluent terminal for an
INSERTthat returns the written rows or generated key through the provider'sRETURNING/OUTPUTform or its scalar identity function, started with Returning(), Returning<TResult>(Expression<Func<TEntity, TResult>>), ReturningIdentity<TKey>(Expression<Func<TEntity, TKey>>), ReturningIdentity<TKey>() or ReturningKey<TKey>().The returned rows are materialised with the same projection pipeline as a query: the entity form returns
TEntity, the projection form returns the projected shape. The builder is single-use, like the InsertBuilder<TEntity> it is created from, and every terminal reads the result through Single() or ToList().
- JoinExpression
A join between two sources: the join kind, the optional
ONcondition, the joined From source and the optional ClickHouse strictness and global modifiers.
- JoinExpressionPlanEqualityComparer
Compares and hashes joins for query-plan caching, taking the join type, strictness, global flag, condition and joined source into account.
- JoinOptions
Per-join options applied while the join is declared, through the trailing
Action<JoinOptions>parameter of theJoin/LeftJoin/RightJoin/FullJoin/SemiJoin/AntiJoin/PasteJoin/CrossJoin/CrossApply/OuterApplyandJoinIntooverloads (for examplea.Join(b, (x, y) => x.Id == y.Id, j => j.WithStrictness(JoinStrictness.Any))). The values are copied into the resulting join, so the options object is not retained. The raw named-table (TableAlias)CrossJoin/CrossApply/OuterApplyoverloads take no options: those joins cannot carry the modifiers described here.
- JoinSlotAttribute
Marks a generated alias projection property with the 1-based slot of the joined table it exposes.
A projection produced by
Joinexposes its items asItem1..Item8; a generated alias projection additionally exposes lexical aliases (for exampleBuyer/Approver) whose types may repeat. The trailing digits ofItemNcarry the slot position; this attribute carries the same information for a member whose name does not. The translator reads it to resolve the right table alias when the joined type occurs more than once.
- JoinedEntityBuilder<T1, T2>
Join builder over a two-table projection, produced by a
Join/LeftJoin/RightJoin/FullJoin/CrossJoincall.
- JoinedEntityBuilder<T1, T2, T3>
Join builder over a three-table projection.
- JoinedEntityBuilder<T1, T2, T3, T4>
Join builder over a four-table projection.
- JoinedEntityBuilder<T1, T2, T3, T4, T5>
Join builder over a five-table projection.
- JoinedEntityBuilder<T1, T2, T3, T4, T5, T6>
Join builder over a six-table projection.
- JoinedEntityBuilder<T1, T2, T3, T4, T5, T6, T7>
Join builder over a seven-table projection.
- JoinedEntityBuilder<T1, T2, T3, T4, T5, T6, T7, T8>
Terminal join builder for the maximum supported join arity, eight tables (T1..Item8).
It declares no further
Join/LeftJoin/RightJoin/FullJoin/CrossJoinmethods and its projection (Projection<T1, T2, T3, T4, T5, T6, T7, T8>) is not IExtendableProjection, so the flat typed arity chain stops at eight. That is a scope bound, not a compile-time rejection: the inherited generic-baseEntityBuilder<Projection<T1..T8>>members still compile, so a further source-less (and a further source-explicit) join is reachable, wrapping the accumulated eight-table projection asItem1.
- JsonColumnAttribute
Marks a property as stored in a JSON column and transparently serialized with
System.Text.Json. The property's CLR type is the serialized model; the provider representation is chosen by Storage.
- JsonColumnConverter<TModel, TProvider>
Serializes a property of
TModelto a JSON column. TheTProvidermust be string (a text column), JsonElement (a provider-native JSON column exposed as an element) or JsonObject (ClickHouse's nativeJSONobject-root transport). Named to avoid theSystem.Text.Json.Serialization.JsonConverter<T>collision.
- JsonColumnOptions
Configuration for a JSON column declared fluently with JsonColumn(Action<JsonColumnOptions>?).
- JsonStreamOptions
Shape options for the JSON streaming terminals (
QueryCommand.WriteJson/EntityBuilder.WriteJsonAsync). The options are validated when the shape plan is built.
- MemberExpressionVisitor
Expression visitor that resolves the MemberInfo referenced by a member expression.
- MemberInfoExtensions
Helpers for resolving a member's column name and for looking up its metadata in the shared entity metadata cache.
- MergeBuilder<TEntity>
Fluent builder for a key upsert (a "merge" of a source row set into the target table), started with CreateMergeBuilder<TEntity>(IDataContext, Action<EntityMetadataBuilder<TEntity>>?). The source is a mapped entity or a batch of entities; the database decides, per key, whether to update the existing row or insert a new one. The statement is rendered through the active dialect as
INSERT ... ON CONFLICT ... DO UPDATE(PostgreSQL, SQLite),INSERT ... ON DUPLICATE KEY UPDATE(MySQL, MariaDB) orMERGE(SQL Server).There is deliberately no change tracking: every terminal (Merge(), MergeAsync(CancellationToken)) issues one explicit command, as with the insert builder. The builder is single-use.
- MergeMatchedBuilder<TEntity>
Terminal of a full-
MERGEWHEN MATCHEDbranch, produced by WhenMatched(). Every terminal returns the originating MergeBuilder<TEntity> so the branches can be chained.
- MergeNotMatchedBuilder<TEntity>
Terminal of a full-
MERGEWHEN NOT MATCHED [BY TARGET]branch, produced by WhenNotMatched(). Every terminal returns the originating MergeBuilder<TEntity> so the branches can be chained.
- MergeNotMatchedBySourceBuilder<TEntity>
Terminal of a full-
MERGEWHEN NOT MATCHED BY SOURCEbranch, produced by WhenNotMatchedBySource(). Only SQL Server renders this branch; the other dialects reject it with NotSupportedException.
- MergeReturningBuilder<TEntity, TResult>
Fluent terminal for a full
MERGEthat returns the merged rows through the provider'sOUTPUT/RETURNINGform, started with Returning() or Returning<TResult>(Expression<Func<TEntity, TResult>>). The returned rows are materialised with the same projection pipeline as a query; every terminal reads the result through Single() or ToList().
- MutationCteQuery<TResult>
Fluent scope that collects the declarations of a
WITHclause whose body includes one data-modifying common table expression (anINSERT ... RETURNING), started with With<TEntity, TResult>(IDataContext, string, InsertReturningBuilder<TEntity, TResult>).Only PostgreSQL accepts a data-modifying CTE body; every other provider rejects it. The scope is typed by the
RETURNINGprojection (TResult), so From(string) reads the rows the mutation returns while FromTable(string) reads an ordinary read CTE declared alongside it.
- MySqlFunctions
MySQL/MariaDB-only SQL surface: the native string/conditional idioms (
find_in_set,field,elt,substring_index,format), the%-templated date conversion and Unix-epoch functions, the hexadecimal hash functions, the IPv4 conversion pair, the JSON mutation family, the binary UUID pair and the MariaDB-only names (extended regexp,nvl/nvl2, the Oracle-compatible date/number conversions,kdf,xxh3/xxh32,json_detailed/json_compact, the JSON canonicalisation pairjson_equals/json_normalizeand sequence access). It also carries the MySQL 8.4 JSON constructor/query catalogue and the->/->>/MEMBER OFoperators (with theJSON_TABLEshape refusal), the string, numeric and bit catalogue:bin,export_set,hex,make_set,oct,ord,quote,soundex,strcmp, the Base64/hex codecs,weight_string,conv,crc32,log2,rand,truncate,bit_countand thebit_and/bit_or/bit_xoraggregates, and thedate/timecatalogue (adddate/subdate,addtime/subtime,convert_tz,get_format,time_to_secand the remaining temporal accessors).Exposed through MySql; every member is gated per name by the dialect's IMySqlFunctions capability object and rejected by providers that do not opt in. MariaDB supports most of this surface through its composed MySQL renderer, excludes the names it does not implement and adds the MariaDB-only names; MySQL rejects those names with a clear message.
- NamedWindowOrderKey
One
ORDER BYkey of a named window definition: the key expression together with its direction. Instances are produced byEntityBuilder<TEntity>.Asc/Desc.
- NullsOrderingRenderer
Renders an
ORDER BYkey with an explicit NULL placement, and validates placement values that reach rendering or execution. Kept out of ISqlDialect so the default interface implementation stays a one-line delegation and the CASE emulation oracle lives in one place.
- OuterRefMarker<T>
Marker for a reference to an element of an outer (ancestor) query scope, used while building correlated subqueries. It is only meaningful inside a query expression: the SQL translator rewrites
OuterRefMarker<T>(idx).Ref.Memberinto a reference to the outer alias's column.
- OutputIntoBuilder
Fluent terminal for an
INSERT/UPDATE/DELETEwhose modified rows are written into a target through SQL Server'sOUTPUT ... INTO <target>(columns)clause instead of being returned to the client. Started withOutputInto(...)orOutputIntoTableVariable(...)on an InsertReturningBuilder<TEntity, TResult>, UpdateReturningBuilder<TEntity, TResult> or DeleteReturningBuilder<TEntity, TResult>.The builder deliberately has no row terminals: nothing is returned to the client, so Execute() reports the affected-row count and ToSql() renders the statement. To also return the rows to the client, use the separate
OutputIntoThenOutput(...)form.The target is either an explicit table name that must already exist, or a table variable declared in the same batch. In both forms the selected output columns are reused as the target column list, so the target columns must have the same names as the selected output columns. A table variable additionally takes a caller-supplied, trusted column-definition text; the declaration text is embedded verbatim and never parameterised.
- Parameter
Name/value pair for a single command parameter.
- PivotExpression
A
PIVOT/UNPIVOTsource: the inner source whose rows/columns are reshaped, together with the aggregate/values (PIVOT) or the value/name columns and column list (UNPIVOT). Stored on Pivot and rendered by the provider that supports the construct (see Pivot / Pivot).
- PivotValue
One value of the
PIVOT ... IN (...)list. The value names the resulting column, so select it in the projection under the desired name (for example.Select(t => new { Q1 = SqlFunctions.Column<decimal?>(t, "1") }): the value is a raw name and is always safely quoted, so a value that is not a plain identifier is still one identifier).
- PivotValues
Translation-only marker for the typed
PIVOTresult projection. An instance of this type is the second parameter of the projection passed to the typed SQL ServerPivotoverload:projection: (t, v) => ... v.Value<decimal?>("1") ....
- PostgresFunctions
PostgreSQL-only SQL surface: arrays, native JSON, the extended scalar library, the PostgreSQL-only aggregates and the
generate_series/unnesttable functions. Exposed through Postgres; every member is gated by a capability flag and rejected by providers that do not opt in.
- PredicateExpressionVisitor<T>
Expression visitor whose traversal is driven by a caller-supplied predicate.
- PreparedQueryCommand<TResult, TRecord>
Base class for prepared (compiled) query commands.
- ProcedureResult
The result of a raw command (ExecuteRaw(string, params IReadOnlyList<ProcedureParameter>)) or a stored procedure (ExecuteProcedure(string, params IReadOnlyList<ProcedureParameter>)). Owns the command and its data reader until disposed. The result object itself enumerates its column-bearing result sets:
foreach (var set in result)orawait foreach (var set in result)yields a ResultSet cursor per set. The legacy Read<T>() / ReadAsync<T>(CancellationToken) path reads sets positionally, each call advancing to the next set.
- Projection<T1>
Accumulated result of a single-table (root-only) source; the item is exposed as
Item1. A generated root-alias projection derives from this type to name slot 1 lexically, and it is the only projection with dimension 1. It is a plain IProjection: a root alias is expression-only and always extended by the generatedpublic newpositional-transition members, so no IExtendableProjection consumer exists for dimension 1 (leavingExtendoff also makes an accidental in-memory extension fail closed instead of guessing).
- Projection<T1, T2>
Accumulated result of a two-table join; items are exposed as
Item1andItem2.
- Projection<T1, T2, T3>
Accumulated result of a three-table join; items are exposed as
Item1..Item3.
- Projection<T1, T2, T3, T4>
Accumulated result of a four-table join; items are exposed as
Item1..Item4.
- Projection<T1, T2, T3, T4, T5>
Accumulated result of a five-table join; items are exposed as
Item1..Item5.
- Projection<T1, T2, T3, T4, T5, T6>
Accumulated result of a six-table join; items are exposed as
Item1..Item6.
- Projection<T1, T2, T3, T4, T5, T6, T7>
Accumulated result of a seven-table join; items are exposed as
Item1..Item7.
- Projection<T1, T2, T3, T4, T5, T6, T7, T8>
Maximum supported join arity: eight tables (T1..Item8). It intentionally does not implement IExtendableProjection, so no ninth item can be absorbed and a direct further
JoinonJoinedEntityBuilder<T1..Item8>is rejected at compile time. The supported escape is to project the accumulated join into a named type withEntityBuilder<T>.As<TResult>(...), which exposes it as a derived table and starts a new join from the named members.
- QueryCommand
Clone and copy support for QueryCommand: the live clone used by prepared commands and the trimmed clone kept as the plan-cache key.
- QueryCommandExtensions
Extension methods that run a QueryCommand<TResult> against raw SQL instead of the generated query, and the terminal operators that stream LOB columns through SequentialAccess: the single-column ToStream(QueryCommand<byte[]>, params ReadOnlySpan<object?>) / ToTextReader(QueryCommand<string>, params ReadOnlySpan<object?>) and the multi-column ToDataReader<TResult>(QueryCommand<TResult>, params ReadOnlySpan<object?>), with their asynchronous counterparts.
- QueryCommand<TResult>
A strongly typed query command producing
TResultrows. It adds the terminal execution surface - materialization, scalar and aggregate terminals, and set operations - on top of the relational shape carried by QueryCommand.
- QueryComponentContext
Default implementation of the prepare/build contexts.
- QueryDefinition
Describes the shape of a QueryCommand: the projection/entity source, the condition, joins, paging, ordering, grouping and logging. It groups the collaborators that used to travel as a long constructor parameter list through QueryCommand, QueryCommand<TResult> and
CreateCommand.
- QueryFilterAttribute
Declares a global query filter on an entity type or interface. The filter is applied to every query in which the entity participates (the primary source, joins and subqueries) unless the query calls
IgnoreFilters. Multiple attributes are combined withand.
- QueryFilterException
Thrown when a data-modifying statement would write a row that violates one of the entity type's active global query filters. Unlike a
WHEREclause, the filters are never injected into the target of anINSERT/MERGE; instead the values being written (or the rows read by anINSERT ... SELECT/query-sourcedMERGEsource) are validated against them before the statement executes.
- QueryFilters
Well-known query-filter keys shared by the filter API.
- QueryPlan
Canonical, hashable description of a query, used as the key of the plan cache.
- QueryPlanEqualityComparer
Equality comparer that keys a whole QueryCommand plan (shape flags, expressions, joins, paging, ...) in the plan cache.
- QueryPreparationContext
Default immutable implementation of IQueryPreparationContext over a command.
- QueryPreparationContribution
An immutable declarative contribution to query preparation. Carried by an IQueryPreparationDescriptor; the engine applies it to a separate effective preparation state before
PrepareColumns/PrepareGroupingand never mutates the raw QueryCommand fields. An active contribution with an empty GroupingKeys vector denotes an explicit global aggregation.
- QueryPreparationException
Thrown when a query cannot be prepared (compiled) for execution.
- RangeColumnsAttribute
Declares that a Range<T> property is stored as a pair of scalar columns instead of a single range column. This is the storage model for providers without a native range type (SQL Server, MySQL, MariaDB, SQLite, ClickHouse); PostgreSQL stores Range<T> natively and does not need it. The lower and upper bounds are written to and read from the two named columns; a SQL
NULLbound means the corresponding side is unbounded.
- RangeColumnsMetadata
The column-pair storage descriptor of a Range<T> property declared with RangeColumnsAttribute or the fluent RangeColumns(string, string, bool, bool) mapping.
- RelationshipAttribute
Declares a navigation relationship on an entity property. Placed on the navigation property; the kind is derived from the navigation shape (a collection is OneToMany, a reference is ManyToOne).
- RelationshipJunctionMetadata
Immutable metadata for the junction (link) entity of a many-to-many relationship: the junction type and the four mapped key members that connect the two principal sides through the junction.
- ReplaceConstantExpressionVisitor
Replaces constant nodes inside an expression.
- ReplaceConstantsExpressionVisitor
Replaces captured constant values with query parameters.
- ReplaceParameterExpressionVisitor
Replaces the query parameters referenced inside an expression.
- ResultSetEnumerator<TResult>
Enumerates the rows of a prepared database command. The data reader is created lazily on the first move, using the connection supplied by IConnectionManager; rows are materialized by the compiled query's map delegate inside
MoveNext/MoveNextAsync, leaving Current a plain field read.
- SelectExpression
A single projected column of a query: its ordinal, the expression that produces it, the target property it maps to and the reader accessor used to materialize it.
- SelectExpressionPlanEqualityComparer
Compares and hashes projected columns for query-plan caching, taking the column ordinal, target property, null-defaulting flag and source expression into account.
- SemanticExpressionEqualityComparer
Semantic equality comparer for expressions, distinct from the value-free plan comparer: literals compare by value, source parameters are alpha-equivalent, closure targets compare by reference identity plus member path, and unknown nodes are conservatively unequal. No captured value is evaluated.
- ServiceCollectionExtensions
Registration helpers for nextorm contexts.
Invariants:
- a concrete context type is registered once per scope: resolving the concrete type and IDataContext yields the same instance (previously they were two separate instances);
- the options delegate is mandatory for factory-based registration — a DataContextBuilder without options can never produce a context, so a null delegate now fails at registration time instead of at resolution time.
- SnakeCaseNamingConvention
Converts CLR names to
snake_case:SimpleEntitybecomessimple_entity,FirstNamebecomesfirst_name. Runs of capitals are treated as one word, soOrderIDbecomesorder_idandHTTPServerbecomeshttp_server.
- SortingExpressionPlanEqualityComparer
Compares and hashes Sorting values for query-plan caching, delegating the comparison of prepared expressions to the registry's plan comparer.
- SqlDialectBase
Default implementations of the dialect contract. Only the parts that genuinely differ between dialects are abstract (MakeParam(string), MakePage(Paging, StringBuilder, KeywordCase)); everything else has a working generic-SQL default, so a dialect overrides just what is different. A class-A capability is expressed as a nullable capability object (for example Iif) and its
Supports*flag is computed from the object's presence, so a dialect cannot report a capability without supplying its rendering; the remaining emitters default to a working generic body and are only overridden where a dialect deviates.
- SqlFunctionAttribute
Maps a CLR method to a database scalar function. Apply it to a placeholder method that is only ever referenced inside a query expression (its body is never executed, so
=> default!orthrow null!is enough) or to the declaring type to map every method by name.The call is translated to
[schema.]name(arg1, arg2, ...). For an instance method the target (node.Object) is emitted as the first argument. The mapped function must already exist in the target database: nextorm only emits a call to it, it does not create it.
- SqlFunctions
Static entry point for SQL constructs that are written directly inside query expressions.
- SqlKeywords
Central construction-time helper that resolves a keyword token (or a fragment that is pure keywords and separators) to the configured KeywordCase. Emitters must pass the exact lower-case token they would have emitted; identifiers, literals and function names are never routed through here, so the case never touches user data. Exposed so provider capability renderers (which live in their own assembly) can case the clauses they emit.
- SqlServerBulkInsertOptions
SQL Server native
SqlBulkCopyoptions. A group with every value left null requests nothing; supplying it on another provider is rejected when the target provider is known.
- SqlServerFunctions
Text-JSON surface (SQL Server and MySQL/MariaDB), the SQL Server-only
chooseconditional function (the portableiiflives on CommonFunctions), the SQL Server T-SQL-only scalar library (the string, trigonometric, date, binary/system and SQL/JSON functions gated per name by ISqlServerFunctions), the SQL Server postfix XML data-type methods (xml_value/xml_query/xml_existand thexml_nodesrowset) and the SQL Server table functions. Exposed through SqlServer; every member is gated by a capability flag and rejected by providers that do not opt in.
- SqlTableAttribute
Maps a class or interface to a database table, overriding the table name that would otherwise be derived from the CLR type name.
- SqliteFts5CommandBuilder
Fluent terminal for a SQLite FTS5 maintenance/control command, started with CreateSqliteFts5CommandBuilder(IDataContext, string). The operation is issued through the FTS5 control interface (
INSERT INTO <table>(...) VALUES(...)); a provider without FTS5 rejects it with NotSupportedException. The builder is immutable: every operation method returns a new builder and leaves the receiver unchanged.
- SqliteFunctions
SQLite-only SQL surface: the core scalars, the JSON1 functions/operators/aggregates, the date helpers and the math-extension functions. Exposed through Sqlite; every member is gated by SqliteFunctions and rejected by providers that do not opt in.
- TableAlias
Column accessors for a table addressed by name instead of by a mapped entity type (the
From("table")mode).
- TableColumn
A typed value read from a named column of an untyped table source.
- TableFunctionExpression
A table-valued function call used as a FROM source. The SQL name/schema and the other metadata are snapshotted from the TvfEntityBuilder<T> descriptor the factory returned; the arguments are kept as expressions and rendered/parameterised by
SqlBuilder.
- TableParameterColumn
One column of a TableParameterValue as resolved for binding: its provider column name, the CLR type bound for it (converter/duration/enum aware) and a getter that reads and normalizes the value from a row.
- TableParameterValue
The value of a table-valued parameter: a sequence of rows plus the CLR type of each row. It is held by Value and never bound by the provider directly — each provider's
CreateProcedureParameterhook translates it (SQL Server streamsSqlDataRecords, other providers pass a JSON document or a typed array).A row type is either a scalar (a primitive, string, decimal, Guid, DateTime/DateTimeOffset/DateOnly/ TimeOnly, TimeSpan,
byte[], an enum or a nullable of these) mapping to one column, or a mapped entity whose columns come from the entity metadata (every non-computed mapped property, in metadata order, including identity columns; use the same[SqlTable]/fluent mapping as a bulk insert). A Range<T> property (two columns) is not supported.The type is not user-extensible: the constructor is
private protectedand instances are created only through theProcedureParameter.Table<T>factories. The rows are enumerated once per provider enumeration; do not mutate or dispose the source between building the descriptor and executing the command.
- TempTableExtensions
Materialises a query into a table:
CREATE TABLE ... AS SELECT(PostgreSQL, SQLite, MySQL, MariaDB),SELECT ... INTO(SQL Server) orCREATE TABLE ... ENGINE = MergeTree ... AS SELECT(ClickHouse). The row shape is taken from the query's projection; the created table is addressed later with From(IDataContext, string). Unlike a common table expression, which is reusable only within one statement, the materialised table is reusable across subsequent queries on the same connection.The temporary form (
ToTempTable) is session-scoped: create and read it on one context (one connection). It is available on PostgreSQL, SQLite, MySQL and MariaDB only — SQL Server has noCREATE TEMPORARY TABLE ... AS SELECT(a session-scoped table isToTable("#name")) and ClickHouse cannot express a temporaryAS SELECT. The terminal issues exactly one command and returns no row count; the in-memory context rejects it with NotSupportedException.Every terminal is offered both on a query builder (before a projection) and on a built QueryCommand<TResult> (after
Select), so a projection can be materialised too.
- TempTableSource<TResult>
A lazy temporary-table materialisation: the query whose rows fill the table plus the statement options. Created by AsTempTable<TResult>(QueryCommand<TResult>, CreateTableOptions?); nothing is executed until a query reads the source through From<TResult>(IDataContext, TempTableSource<TResult>).
Reading it runs one batch —
DROP TABLE IF EXISTS,CREATE TEMPORARY TABLE ... AS SELECTand the read — on a single session, so the table is always freshly materialised and never depends on connection pinning (safe under a connection-level pooler such as PgBouncer).
- TemporalClause
The
FOR SYSTEM_TIMEtemporal-table clause attached to a query throughEntityBuilder.ForSystemTime. Create it with one of the static factory methods; the native syntax is rendered by the provider dialect.
- TruncateBuilder<TEntity>
Fluent terminal for a
TRUNCATE TABLE, started with CreateTruncateBuilder<TEntity>(IDataContext, Action<EntityMetadataBuilder<TEntity>>?). Renders the provider's native form and executes it on the context; providers withoutTRUNCATE(SQLite) reject it with NotSupportedException.
- TvfEntityBuilder<T>
A context-independent runtime descriptor of a table-valued function used as a query source.
A TVF factory is an ordinary static method that returns this descriptor, for example
public static TvfEntityBuilder<Row> MyTvf(int id) => new("my_tvf", "dbo");. The scalar parameters of the factory only name the argument positions of the call expression; the metadata (name, schema, clauses, verbatim index list, result schema) must not depend on the argument values. The arguments themselves stay in the caller's expression tree and are lowered when the descriptor is consumed byIDataContext.From/Join/APPLY, so a correlated argument is never evaluated as a CLR value.The descriptor carries no data context and never gets one written into it: composing
Where/OrderByand the other builder operators clones an unbound chain that fails explicitly on any context-dependent operation until it is bound by the context that consumes it. Metadata is constructor-only and immutable; the verbatim index list is defensively copied.
- TvfJoinSourceExtensions
#320 (T320) lambda-source join overloads: the runtime table-valued-function descriptor is supplied as an expression (
builder.Join(() => Db.MyTvf(42), (left, right) => ...)), so the factory call keeps its argument expressions and the source is lowered by the shared NextORM.Core.SourceExpressionLowerer instead of being resolved from entity metadata.These are extension methods on purpose: an instance overload taking Expression<TDelegate> next to the existing
Cte<T>overload would make an untypedJoin(null, null)probe ambiguous (the existing call must keep binding to the CTE overload), while an extension is only considered when no instance overload applies. Calls that passed an entity/CTE/derived-query builder keep binding to the instance methods unchanged.The factory must return TvfEntityBuilder<T> for the same row type, and its metadata must not depend on the argument values. A captured descriptor or any other shape without the original call expression is rejected with NotSupportedException (lost provenance).
- TypeExpressionVisitor<T>
Expression visitor that operates on a single entity type.
- TypeExpressionVisitor<T1, T2>
Expression visitor that operates over two entity types (used when translating join conditions).
- TypeExtensions
Helpers for classifying runtime types and comparing them while building queries.
- UnpivotColumn
One source column of the
UNPIVOT ... IN (...)list. The column name becomes the name-column value for the rows produced from this column.
- UnpivotValues
Translation-only marker for the typed
UNPIVOTresult projection. An instance of this type is the second parameter of the projection passed to the typed SQL ServerUnpivotoverload:projection: (t, v) => ... v.Name<string>("qtr") ... v.Value<decimal?>("val") ....
- UpdateBuilder<TEntity>
Fluent builder for an
UPDATEstatement, started with CreateUpdateBuilder<TEntity>(IDataContext, Action<EntityMetadataBuilder<TEntity>>?). The columns to write are supplied with Set<TValue>(Expression<Func<TEntity, TValue>>, TValue), Set<TValue>(Expression<Func<TEntity, TValue>>, Expression<Func<TEntity, TValue>>) or Set(TEntity); the rows to change are selected with Where(Expression<Func<TEntity, bool>>). Omitting Where(Expression<Func<TEntity, bool>>) updates every row the target's global query filters allow (disable them withIgnoreFiltersto reach the rest).There is deliberately no change tracking: the terminal issues exactly one explicit command and updates only the columns named in the
SETlist, never "the changed properties".
- UpdateJoinBuilder<TProjection>
Fluent builder for a multi-table
UPDATE(theUPDATE ... FROM/join form), started with CreateUpdateJoinBuilder<T1, T2>(JoinedEntityBuilder<T1, T2>). The target is the first table of the join chain; the columns to write are supplied withSet(...), whose right-hand side may read any joined table. The rows to change are selected by the join and an optional Where(Expression<Func<TProjection, bool>>).Only INNER joins are supported: the
FROM/join form folds the join conditions into theWHERE, so an outer join would silently change which rows are updated. There is deliberately no change tracking — the terminal issues exactly one explicit command.
- UpdateJoinReturningBuilder<TProjection, TResult>
Fluent terminal for a multi-table
UPDATEthat returns the updated rows through PostgreSQL'sUPDATE ... FROM ... RETURNINGform, started with Returning<TResult>(Expression<Func<TProjection, TResult>>). The returned rows are materialised with the same projection pipeline as a query; every terminal reads the result through Single() or ToList(). The same builder is also accepted as a data-modifying CTE body by With<TProjection, TResult>(IDataContext, string, UpdateJoinReturningBuilder<TProjection, TResult>).
- UpdateReturningBuilder<TEntity, TResult>
Fluent terminal for an
UPDATEthat returns the updated rows through the provider'sRETURNING/OUTPUTform, started with Returning() or Returning<TResult>(Expression<Func<TEntity, TResult>>). The returned rows are materialised with the same projection pipeline as a query; every terminal reads the result through Single() or ToList().
- ValueConverterAttribute
Declares the IPropertyValueConverter applied to a mapped property. The converter type must be a non-abstract class implementing IPropertyValueConverter with a public parameterless constructor.
- ValueConverter<TModel, TProvider>
Base class for a strongly typed property value converter. Subclasses override the typed ConvertToProvider(TModel?) and ConvertFromProvider(TProvider?) methods; the IPropertyValueConverter members are implemented here through a cached typed invoker so value types are not boxed on every row.
- VisitorOptions
The construction-time collaborators of BaseExpressionVisitor (and of the visitors derived from it) grouped into a single value, replacing the long constructor parameter list.
- WhereExpressionVisitor
Translates a predicate expression into a SQL
WHEREclause.
- WindowDefinition
A named window declared on a query with
EntityBuilder<TEntity>.Window(...)and rendered as part of the query'sWINDOWclause (w AS (PARTITION BY ... ORDER BY ... frame)). A window function references it through Over(string).
- WindowFrame
The optional
ROWS/RANGE/GROUPS BETWEEN ... AND ...frame of a window specification, with an optionalEXCLUDE. Not every provider can express every unit or an exclusion; the translator rejects an unsupported combination through the dialect capability flags.
- WindowFrameBound
A single boundary of a WindowFrame (e.g.
1 preceding).
- WindowFunction<T>
A window-function call that has not been given its
OVERclause yet. Therow_number,rank,lag,sum_over, ... methods of CommonFunctions return this wrapper so that Over(Expression<Func<object?>>?, Expression<Func<object?>>?, WindowFrame?) can be chained and returns the value type that is actually read from the result set.The wrapper is only ever produced by the compiler while building an expression tree; none of its members is executed. The nested
partitionBy/orderBylambdas close over the outer query parameter, e.g.SqlFunctions.Sql.row_number().Over(partitionBy: () => e.Int, orderBy: () => e.Id).
- WindowOrder
An
ORDER BYexpression of a window specification together with its direction.
Structs
- BulkCopyFlags
The provider-specific bulk-copy flags requested for a write, passed to the native bulk hooks BulkInsertRows(string, IReadOnlyList<string>, IReadOnlyList<IPropertyMetadata>, IEnumerable<object?[]>, int?, int?, Action<int>?, int, BulkCopyFlags) and BulkInsertRowsAsync(string, IReadOnlyList<string>, IReadOnlyList<IPropertyMetadata>, IAsyncEnumerable<object?[]>, int?, int?, Action<int>?, int, BulkCopyFlags, CancellationToken). A set flag is a request; an unset flag means "not requested", so an explicitly supplied
falseon BulkInsertOptions never appears here (absence is the off state). Only the SQL Server nativeSqlBulkCopypath can expressTableLockandFireTriggers;CheckConstraints=trueandKeepNulls=trueare honoured by every path, the first because a path that always checks constraints needs no request and the second because every path writes the caller's values.
- CommandEventData
Metadata about a command as it moves through the execution lifecycle. Created by the context's execution axis and passed to the interceptors registered for it.
- ConnectionEventData
Metadata about a connection as it is opened. Created by the context's connection axis and passed to the interceptors registered for it.
- CreateTableAsClause
The options of a
CREATE [TEMPORARY] TABLE ... AS SELECTclause, handed to MakeCreateTableAsSelect(CreateTableAsClause, string, KeywordCase) so the dialect can spell the statement natively. Table and Columns are already resolved and, when identifier quoting is enabled, quoted by the caller — the dialect only places them.
- ForJsonClause
The trailing
FOR JSONclause of a statement (SQL Server): the output mode plus the optionalROOTwrapper name and theINCLUDE_NULL_VALUESflag.
- ForXmlClause
The trailing
FOR XMLclause of a statement (SQL Server): the output mode plus the optional row element name (RAW('name')/PATH('name')),ROOT('name')wrapper andELEMENTSflag.
- Paging
Limit/offset pair describing a single page request.
- PrepareOptions
Options controlling how a prepared query command is built by
QueryCommand<TResult>.PrepareandEntityBuilderExtensions.Prepare.The default value (
default(PrepareOptions)) prepares a buffered command whose underlying command is reused per connection, which is the behavior of the parameterless preparation.
- PreparedCommandOptions
The non-generic setup of a DbPreparedQueryCommand<TResult>. The mapping delegate is not part of this value because it is generic in the result type.
- ProcedureOutputParameter
A snapshot of one output or input/output parameter after a raw command has run. The live
DbParameteris never exposed: the value is copied when the owning ProcedureResult reads its outputs.
- ProcedureParameter
Describes a single parameter of a raw command or stored procedure: its name, value and the ADO.NET parameter options (ParameterDirection, DbType, Size, TypeName). The same shape serves raw parameterised SQL (
ExecuteRaw) and stored procedures (ExecuteProcedure).
- Range<T>
A provider-agnostic range value: a contiguous interval of
Twhose bounds may be inclusive or exclusive and may be unbounded on either side, plus the empty range. It mirrors the invariants of the PostgreSQL range types without taking a dependency on a driver; the PostgreSQL provider maps it toint4range/int8range/numrange/tsrange/tstzrange/daterange.
- ResultSet
A single column-bearing result set of a multi-result command, produced by enumerating ProcedureResult or BatchResult. The cursor is valid only while its set is the current one: reading after the outer traversal has advanced or ended, after a previous read of the same set, or through an uninitialized default value throws InvalidOperationException; reading after the owning result was disposed throws ObjectDisposedException.
- Sorting
A single
ORDER BYkey: an expression or a resolved column index together with its direction.
- SqlDefault
Marker passed to Value<TValue>(Expression<Func<TEntity, TValue>>, SqlDefault) or used as a mapped member in a
Values(source, mapping)projection to write the column's databaseDEFAULTinstead of a value.A provider whose dialect cannot render the
DEFAULTkeyword in aVALUESlist (SQLite) rejects it with NotSupportedException; omit the column instead, which yields the same default.
- XxHash32
Incremental hash builder implementing xxHash32, used internally to compute expression and query plan hashes.
Interfaces
- IAliasProvider
Allocates and resolves the table aliases (
t1,t2, ...) of the sources in a query.
- IArrayJoinProjection
Marker for the projection produced by
ArrayJoinElement/LeftArrayJoinElement. It deliberately does not implement IProjection: unlike the join projections it is not accumulated per source table (code dispatched by IProjection must not treat it as a joined source), and it wraps the original entity (Item1) together with the value expanded by the boundARRAY JOIN(Element).
- IArrayJoinRenderer
A dialect's renderer for the ClickHouse
ARRAY JOINclause. The object's presence is the capability.
- IClickHouseAggregateRenderer
A dialect's renderer for the ClickHouse aggregate catalogue that has no cross-provider spelling (the statistical/probability aggregates, the parameterised quantile algorithms, the array- and tuple-returning aggregates, the sequence aggregates and the time-series grid aggregates). The object's presence is the capability, so a name the dialect reports as supported always has a rendering; every other provider fails closed instead of emitting invalid SQL.
- IColumnsProvider
Supplies the columns available on a query source.
- IConnectionInterceptor
Observes the connection lifecycle of a database-backed context.
- IConnectionManager
Owns the lifecycle of the underlying database connection. Deliberately not part of IDataContext: a provider without a connection (the in-memory context) must not be forced to implement it as a no-op.
- IContextEnvironment
Ambient context state and configuration: loggers, mapping mode and the user-owned property bag.
- IDataContext
Composite facade over the individual context roles, kept as the convenient entry point for consumers. The roles are separate interfaces so that providers and collaborators can depend on the smallest surface they actually need:
- IQueryExecutor — terminal operators;
- IQueryMaterializer — planning + row reading;
- IQueryCache — plan cache;
- IContextEnvironment — loggers, mapping mode, property bag;
- IRawCommandExecutor — raw parameterised commands.
Connection management is deliberately not part of this composite (see IConnectionManager): the in-memory provider must not be forced to implement a no-op connection lifecycle.
- IDateConversionRenderer
A dialect's renderer for the ClickHouse date-conversion surface (
toDate/toDateTime/toStartOf*/toYYYYMM/toUnixTimestamp). The object's presence is the capability.
- IDistinctOnRenderer
A dialect's renderer for the PostgreSQL
DISTINCT ON (col, ...)modifier. The object's presence is the capability.
- IEntityMetadata
Read-only mapping metadata for an entity type: the mapped table and its properties.
- IExtendableProjection
An IProjection that can absorb one more item. Only projections below the maximum supported join arity implement it, so callers probe with
israther than assuming every projection can be extended.The maximum supported join arity is 8 tables (
Projection<T1..Item8>); that projection deliberately does not implement this interface. To keep composing past the cap, project the accumulated join into a named type withEntityBuilder<T>.As<TResult>(...)and continue from the resulting derived table.
- IExtremeRowRenderer
A dialect's optional native renderer for
SelectWhereMax/SelectWhereMin(PostgreSQLDISTINCT ON/ORDER BY ... LIMIT 1, ClickHouseargMin/argMax). The object's presence is the capability: a dialect that returns null keeps the shared portable window-function lowering, as does a renderer whose CanRender(ExtremeRowDescription) answersfalse.
- IIifRenderer
A dialect's renderer for the conditional
iif(condition, whenTrue, whenFalse). The object's presence is the capability: a dialect whose provider has a native spelling exposes a stateless singleton, while a dialect without one returnsnullfrom Iif and the expression translator rejects the call instead of emitting SQL the provider cannot execute.
- IIndexHintRenderer
A dialect's renderer for table index hints (MySQL/MariaDB
USE|FORCE|IGNORE INDEX, SQLiteINDEXED BY/NOT INDEXED, SQL ServerWITH (INDEX(...))). The object's presence is the capability: a dialect that returns null rejects a command that carries an index hint.
- ILimitByRenderer
A dialect's renderer for the ClickHouse
LIMIT [offset, ]n BY expr, ...modifier that keeps the firstnrows per group. The object's presence is the capability; only ClickHouse exposes it today.
- ILockRenderer
A dialect's renderer for row locking. UsesTableHints selects the shape of the token Render(LockMode, KeywordCase) returns: a trailing
FOR UPDATE/FOR SHAREclause, or a bare table hint (the caller wraps it inWITH (...)). The object's presence is the capability, and since one shape is selected by UsesTableHints the renderer never has an unreachable method. A dialect that can expressNOWAIT/SKIP LOCKEDadditionally overrides Render(LockMode, LockWaitMode, KeywordCase); the inherited default only supports Wait and throws NotSupportedException for the other modes.
- IMultiIfRenderer
A dialect's renderer for the ClickHouse multi-branch conditional
multiIf(cond1, then1, ..., else). The object's presence is the capability.
- IMySqlFunctions
A dialect's renderer for the MySQL/MariaDB-only functions of MySqlFunctions (the native string/conditional idioms, the
%-templated date conversion and Unix-epoch functions, the hexadecimal hashes, the IPv4 conversion pair, the JSON mutation family and the binary UUID pair). The predicate and the renderer live on one object, so a name the dialect reports as supported always has a rendering; a provider with only part of the family (MariaDB) answers Supports(string) per name, and a provider with none returns null from MySqlFunctions.
- INamingConvention
Translates a CLR type/property name into a physical table/column name when the name was not declared explicitly (no
[SqlTable]/[Column]attribute and no fluent mapping). Explicit names are always taken verbatim, so a convention never overrides a declared mapping.
- INullSafeComparisonRenderer
A dialect's renderer for the explicit null-safe comparison helpers (is_distinct_from<T>(T, T) and is_not_distinct_from<T>(T, T)). Each form carries its own disposition, so a provider can support one form and reject the other, and every disposition other than Unsupported has its rendering on the same object.
- IParameterProvider
Allocates parameter names (for example
p0,p1, ...) while a command is built.
- IPivotRenderer
A dialect's renderer for the native
PIVOT/UNPIVOTpair (SQL Server). The object's presence is the capability.
- IPreparedQueryCommand<TResult>
A query that has been compiled once and can be executed repeatedly.
- IProjection
Marker for an accumulated join projection. It declares no members, but it is observed by the SQL builder, the mapping code and the in-memory provider (via
IsAssignableTo(typeof(IProjection))), so the marker carries meaning. The ability to absorb one more item is expressed separately by IExtendableProjection, because it is only supported below the maximum join arity.
- IPropertyMetadata
Read-only mapping metadata for a single entity property: its CLR member and target column.
- IPropertyValueConverter
Converts a mapped property's value between its CLR model type and the representation stored by the provider. A converter is attached to a property with ValueConverterAttribute or with the fluent HasConversion(IPropertyValueConverter) mapping, and is applied on both the read and the write path. The name avoids the
System.Windows.DataIValueConvertercollision.
- IQuantileAggregateRenderer
A dialect's renderer for the ClickHouse parameterised quantile aggregates (
quantile(level)(value),median(value)). The object's presence is the capability.
- IQueryCache
Holds cached query plans, including the shared
Anyplan owned by the context.
- IQueryComponent
Narrow public contract for a query component. A component carries its own slot identity and handler; there is no global registry. The prepared descriptor is immutable and participates in the plan key.
- IQueryComponentBuildContext
Context supplied to BuildQuery(IQueryComponentBuildContext). It exposes the command being built and the engine's expression comparer.
- IQueryComponentDescriptor
Immutable prepared state of a query component. It participates in the plan-cache key through StructuralHash and StructurallyEquals(IQueryComponentDescriptor?).
- IQueryComponentPrepareContext
Context supplied to Prepare(IQueryComponentPrepareContext). It exposes the command being prepared and the engine's expression comparer.
- IQueryComponentShape
Optional pre-preparation structural identity of a query component, used by the engine's raw (pre-preparation) recipe cache. The engine captures a command's value-free raw shape before it is prepared and may then reuse another command's prepared plan, so a component that wants that fast path must describe, without a prepare context, which of its state changes the statement it produces. Two components that report an equal ShapeState and structurally equal selectors must render the same statement for the same command; that is the contract this interface carries.
- IQueryExecutor
Executes a prepared query command and materializes its result. The convenience overloads (parameterless
ToList,Any, cancellation-only variants) live in DataContextExtensions.
- IQueryFilterMetadata
A query filter declared for an entity type: the optional key and the predicate lambda that nextorm applies to every query in which the entity participates.
- IQueryInterceptor
Observes the lifecycle of the commands a context executes. The events are raised by the context's execution axis, not by the command: a DbCommand is only the event payload and cannot log or profile itself.
- IQueryMaterializer
Narrowest contract for a component that only needs to prepare a query and read its rows (planning + materialization) without running terminal operators. Used as a parameter type so such components do not have to depend on the whole IDataContext.
- IQueryPlanner
Builds and resets the execution plan behind a query command.
- IQueryPreparationContext
Immutable read-only view of an unprepared QueryCommand exposed to a query component during Prepare(IQueryComponentPrepareContext). It never mutates the command and is safe to capture.
- IQueryPreparationDescriptor
Optional prepared descriptor carrying a QueryPreparationContribution. Components that do not implement this interface leave the raw preparation state untouched (legacy fallback).
- IQueryRegistry
Registry of the queries, outer references and plan-equality comparers that make up a query scope.
- IRawCommandExecutor
Executes a raw parameterised command (not only
SELECT) and exposes its result sets, output parameters and return value. This is the foundation of stored-procedure support: the same ProcedureParameter shape carries input, output and structured parameters.
- IRelationshipMetadata
Read-only metadata for a declared navigation relationship between two entity types. A relationship is declared explicitly (fluent
HasMany/HasOneor RelationshipAttribute); the core does not infer relationships from conventions.
- IRowReaderFactory
Creates row readers over a prepared query command and exposes them as enumerables. The enumerable members are default implementations built on the two reader factories; a provider may override GetEnumerable<TResult>(IPreparedQueryCommand<TResult>, params object[]?) when its readers already implement IEnumerable<T> (the in-memory context does, to skip the compiler-generated iterator state machine).
- IScalarFunctions
A dialect's renderer for the cross-provider scalar string/number functions of CommonFunctions (
left/right,lpad/rpad,repeat/reverse/space,concat_ws,translate,ascii/char,bit_length/octet_length,cot/degrees/radians/pi). The predicate and the renderer live on one object, so a name the dialect reports as supported always has a rendering; a provider that can express only part of the family answers Supports(string) per name, and a provider that can express none returns null from ScalarFunctions.
- ISequenceAggregateRenderer
A dialect's renderer for the ClickHouse sequence/funnel aggregates (
windowFunnel,sequenceMatch,retention). The object's presence is the capability.
- ISessionInfoFunctions
A dialect's session/information function surface (
current_user,session_user,current_schema,current_database,version). The predicate and the renderer live on one object, so a name the dialect reports as supported always has a rendering; a provider that can express only part of the family (ClickHouse, SQLite) exposes the same object and answers Supports(string) per name.
- ISqlDialect
Rendering contract of a SQL dialect: everything that differs between providers when SQL text is produced. Kept separate from DataContext so that SQL generation does not depend on the whole execution pipeline (connection lifecycle, plan cache, materialization) — see
SqlBuilderand the expression visitors, which depend on this interface only.Connection/parameter creation (
CreateConnection/CreateParam) and column mapping (MapColumnExpression) are deliberately not part of this contract: they are separate axes.
- ISqlServerFunctions
A dialect's surface for the SQL Server-only T-SQL scalar functions that have no cross-provider analog (the string functions
PATINDEX/QUOTENAME/SOUNDEX/DIFFERENCE/STRING_ESCAPE/UNICODE/NCHAR/FORMAT, the trigonometric functions, the date functionsDATENAME/DATE_BUCKETand the clock/offset/*FROMPARTSfamily, the binary/system functionsHASHBYTES/NEWSEQUENTIALID, theCHECKSUM/COMPRESS/RAND/STUFFscalars, the metadata functions (COL_LENGTH/OBJECT_ID/DB_ID/SCHEMA_NAME/FILE_ID/ISDATE/STR/FORMATMESSAGEand the rest of the A–D metadata families) and the SQL/JSON constructors/aggregates/predicates). The predicate and the renderer live on one object, so a name the dialect reports as supported always has a rendering; null is the capability being absent, which makes every other provider reject the members with a clear message.
- ISqliteFunctions
A dialect's renderer for the SQLite-only SQL surface exposed through Sqlite (SqliteFunctions): the core scalars (
printf/format,hex/unhex,random/randomblob,quote,typeof,glob,unicode/char,soundex,octet_length,if/ifnull), the JSON1 functions/operators/aggregates (json_extract,->/->>,json_set,json_group_array, ...), the date functions (timediff,unixepoch,julianday), the math-extension functions (acos,degrees,log2,mod,pi, ...) and the full-text (FTS3/FTS4/FTS5) query surface (Match,Rank,FTS5bm25,Highlight,FTS3Offsets, ...). The predicate and the renderer live on one object, so a name the dialect reports as supported always has a rendering, and a provider that cannot express the surface returns null from SqliteFunctions.
- IStringFormatFunctions
A dialect's formatting surface for the culture-invariant subset of CLR format specifiers used by
string.Format/$"...{x:fmt}"/x.ToString(fmt). The object also answers whether a given specifier is expressible exactly, so a provider that can renderF/Dbut notNrejects the latter instead of dropping the group separators. The object's presence is the capability; null means the provider cannot render CLR format specifiers at all.
- IStringSplitRenderer
A dialect's renderer for a scalar split of a string (
string.Split; ClickHousesplitByChar). The object's presence is the capability.
- ITableSampleMethods
A dialect's renderer for
TABLESAMPLE. The predicate and the renderer live on one object, so a sampling method the dialect reports as supported always has a rendering.
- ITopKAggregateRenderer
A dialect's renderer for the ClickHouse parameterised top-K aggregates (
topK(N)(value),topKWeighted(N)(value, weight)). The object's presence is the capability.
- ITransactionManager
Owns the transaction associated with the context's connection: starting one, enlisting in a caller-supplied one, and exposing the active transaction to the execution path. Deliberately separate from IConnectionManager (SRP) and not part of IDataContext, so the in-memory context is not forced to implement it.
- ITupleRenderer
A dialect's renderer for row values / composite tuples: the constructor (PostgreSQL
ROW(a, b), ClickHousetuple(a, b)) and, when supported, positional element access on a server-side row (PostgreSQL(row).fN, ClickHousetupleElement(row, N)). The object's presence is the capability: a dialect that returns null rejects the tuple surface.
- IUniqAggregateRenderer
A dialect's renderer for the ClickHouse distinct-count family (
uniq,uniqExact,uniqCombined,uniqHLL12). The object's presence is the capability.
- IUuidGenerators
A dialect's UUID generator surface (
gen_random_uuid,uuidv7). The predicate and the renderer live on one object, so a generator the dialect reports as supported always has a rendering; a provider with only one of the two (SQL Server, MariaDB) answers Supports(string) per name.
- IValueEqualityComparer<T>
An equality comparer for value types that takes its operands by reference to avoid boxing.
- IXmlFunctions
A dialect's surface for the postfix XML data-type methods on a SQL Server
xmlcolumn (operand.value('xpath', 'sqltype'),operand.query('xpath'),operand.exist('xpath')and theoperand.nodes('xpath')rowset). The predicate and the renderer live on one object, so a method the dialect reports as supported always has a rendering;nullis the capability being absent.
- SqlFunctions.IGenerateRandomRow
Row shape produced by generate_random() and generate_random(long): the fixed structure
id UInt64, value Float64, name Stringof ClickHouse'sgenerateRandom.
- SqlFunctions.IGenerateSeriesRow
Row shape produced by generate_series(long, long): a single column named
generate_seriesholding the generated number.
- SqlFunctions.IGenerateSubscriptsRow
Row shape produced by generate_subscripts<T>(T[], int?): the single
generate_subscriptscolumn holds one subscript of the requested dimension.
- SqlFunctions.IJsonArrayElementsRow
Row shape produced by jsonb_array_elements(object?), jsonb_array_elements_text(object?), json_array_elements(string?) and json_array_elements_text(string?): the single
valuecolumn holds one array element (ajson/jsonbdocument rendered as text, or plain text).
- SqlFunctions.IJsonEachRow
Row shape produced by json_each(string?) and json_tree(string?): one row per JSON element. The
key,value,type,fullkeyandpathcolumns are projected as text (SQLite renders an array index or a primitive value as its text form).
- SqlFunctions.IJsonObjectKeysRow
Row shape produced by jsonb_object_keys(object?): the single
jsonb_object_keyscolumn holds one top-level object key.
- SqlFunctions.IJsonPathQueryRow
Row shape produced by jsonb_path_query(object?, string?): the single
jsonb_path_querycolumn holds one JSONPath match (a jsonb document rendered as text).
- SqlFunctions.IJsonPathQueryTzRow
Row shape produced by jsonb_path_query_tz(string?, string?, string?, bool?): the single
jsonb_path_query_tzcolumn holds one time-zone-aware JSONPath match (a jsonb document rendered as text). The column is named after the function, unlike thevaluecolumn of the array readers, so the row shape is separate from SqlFunctions.IJsonPathQueryRow.
- SqlFunctions.IJsonTreeRow
Row shape produced by json_tree(string?): one row per JSON element, recursively. In addition to the SqlFunctions.IJsonEachRow columns it exposes the element
idand theparentid.
- SqlFunctions.IJsonbEachRow
Row shape produced by jsonb_each(object?), jsonb_each_text(object?), json_each(string?) and json_each_text(string?): the
key/valuecolumns of one object property (the value is ajson/jsonbdocument rendered as text, or plain text). All four functions return exactly two columns on PostgreSQL 17, so they share this shape.
- SqlFunctions.IKeyRankRow<TKey>
Row shape produced by containstable<TKey>(string, string, string) and freetexttable<TKey>(string, string, string): the SQL Server full-text
KEY(the full-text key of the matched row, used to join back to the base table) andRANK(the relevance score) columns.
- SqlFunctions.IListeningChannelRow
Row shape produced by pg_listening_channels(): a single column named
pg_listening_channelsholding one channel name this session is listening on.
- SqlFunctions.INumbersRow
Row shape produced by numbers(long) and numbers_mt(long): a single column named
numberholding the generated value.
- SqlFunctions.IOpenJsonRow
Row shape produced by openjson(string?): the
key/value/typecolumns of SQL Server'sopenjson(the default schema, i.e. object properties or array elements).
- SqlFunctions.IPgAvailableWalSummaryRow
Row shape produced by pg_available_wal_summaries(): one WAL summary file per row. The
pg_lsnbounds are read as text (the row mapper has no LSN accessor); the set is empty until the server has written summaries (it needssummarize_wal = on).
- SqlFunctions.IPgCatalogForeignKeyRow
Row shape produced by pg_get_catalog_foreign_keys(): one catalog foreign-key relationship per row. Both table columns are
regclassand both column lists aretext[]; the tables are read as text (::textin the projection) and the arrays keep their element order, including NULL elements the server may return.
- SqlFunctions.IPgCommittedXactRow
Row shape produced by pg_last_committed_xact(): the most recent transaction with a commit timestamp (zero or one row).
roidentis read as text.
- SqlFunctions.IPgControlCheckpointRow
Row shape produced by pg_control_checkpoint(): the checkpoint state recorded in the control file.
pg_lsnandoidcolumns are read as text andxidcolumns as uint, the CLR type the driver exposes forxid.
- SqlFunctions.IPgControlInitRow
Row shape produced by pg_control_init(): the compile-time and
pg_controlconstants of the running server (alignment, block sizes, identifier limits).
- SqlFunctions.IPgControlRecoveryRow
Row shape produced by pg_control_recovery(): the recovery state recorded in the control file. The
pg_lsncolumns are read as text (0/0when unset), because the driver's LSN type has no CLR mapping in the row mapper.
- SqlFunctions.IPgControlSystemRow
Row shape produced by pg_control_system(): the one
pg_control_systemrecord (control-file version, catalog version, the cluster's system identifier and the control file's modification time).
- SqlFunctions.IPgIdentifyObjectAddressRow
Row shape produced by pg_identify_object_as_address(string?, string?, int?): the machine-readable address of one catalog object. Both address components are
text[]and keep their element order;object_argsis empty for objects whose address needs no arguments.
- SqlFunctions.IPgIdentifyObjectRow
Row shape produced by pg_identify_object(string?, string?, int?): the human-readable identification of one catalog object — its type, schema, name and the identity string that the server accepts back as an object reference. An object that does not exist yields one all-NULL row.
- SqlFunctions.IPgInputErrorInfoRow
Row shape produced by pg_input_error_info(string?, string?): the soft error report of parsing a value as a type, without raising the error. A valid value yields one all-NULL row; an invalid value yields the message, the SQLSTATE code and the optional detail/hint.
- SqlFunctions.IPgKeywordRow
Row shape produced by pg_get_keywords(): one SQL keyword or keyword-like token per row.
catcodeis PostgreSQL's internal"char"one-byte category code, read as text because the row mapper has no char accessor.
- SqlFunctions.IPgMultixactMemberRow
Row shape produced by pg_get_multixact_members(uint?): one row per transaction that is a member of the multixact. Nothing is returned for a multixact id the server has not created yet.
- SqlFunctions.IPgObjectAddressRow
Row shape produced by pg_get_object_address(string?, string?[], string?[]): the catalog coordinates of one object. Both OIDs are read as text, like the other
oid-returning members of the family.
- SqlFunctions.IPgOptionRow
Row shape produced by pg_options_to_table(string?[]): one storage-option entry per row (the same shape
unnest(reloptions)would split by hand).
- SqlFunctions.IPgWalSummarizerStateRow
Row shape produced by pg_get_wal_summarizer_state(): the single state row of the WAL summarizer. The
pg_lsncolumns are text andsummarizer_pidis NULL while the summarizer is not running.
- SqlFunctions.IPgWalSummaryContentRow
Row shape produced by pg_wal_summary_contents(long?, string?, string?): one block range of a WAL summary file. The
oidcolumns are read as text like the otheroid-returning members of the family andrelforknumberis a short (int2).
- SqlFunctions.IPgXactCommitOriginRow
Row shape produced by pg_xact_commit_timestamp_origin(uint?): the commit timestamp of one transaction and the replication origin it belongs to (
roidentread as text). Requirestrack_commit_timestamp; a transaction without a commit timestamp yields NULL columns.
- SqlFunctions.IRegexpMatchesRow
Row shape produced by regexp_matches(string?, string?): the single
regexp_matchescolumn is atext[]holding the captured groups (the whole match when there are no groups). PostgreSQL returnssetof text[].
- SqlFunctions.IRegexpSplitToTableRow
Row shape produced by regexp_split_to_table(string?, string?): the single
regexp_split_to_tablecolumn holds one fragment.
- SqlFunctions.ISnapshotXipRow
Row shape produced by pg_snapshot_xip(string?): a single column named
pg_snapshot_xipholding one in-progress transaction id of the snapshot. The id is read as text (xid8has no CLR mapping in the row mapper), exactly like the scalarpg_snapshot_xmin/pg_snapshot_xmaxmembers.
- SqlFunctions.ISqlServerRegexpMatchRow
Row shape produced by regexp_matches(string?, string?): SQL Server 2025 returns one row per match with
match_id bigint, the one-basedstart_position intandend_position int, the matched text asmatch_value varchar(n)and the capture groups as the engine's JSON text insubstring_matches varchar(max). Thesubstring_matchescolumn is carried as an opaque string: its length is not fixed by the input, so it is never cast or truncated by the provider.
- SqlFunctions.ISqlServerRegexpSplitToTableRow
Row shape produced by regexp_split_to_table(string?, string?): SQL Server 2025 returns the fragment as
value varchar(n)and its one-based position asordinal bigint.
- SqlFunctions.IStringSplitRow
Row shape produced by string_split(string?, string?): a single column named
valueholding one fragment (SQL Serverstring_split).
- SqlFunctions.IStringToTableRow
Row shape produced by string_to_table(string?, string?): the single
string_to_tablecolumn holds one fragment.
- SqlFunctions.ITablespaceDatabaseRow
Row shape produced by pg_tablespace_databases(string?): a single column named
pg_tablespace_databasesholding one database OID, read as text like the otheroid-returning members of the family.
- SqlFunctions.ITsDebugRow
Row shape produced by ts_debug(string?): one tokenizer step of the default text-search configuration for the document. The six columns are the documented
ts_debugresult on PostgreSQL 17 —alias,description,token,dictionaries(regdictionary[]),dictionary(regdictionary) andlexemes(text[]). The two dictionary columns have no CLR mapping and are read as text (the emitted projection casts them:dictionaries::text[]anddictionary::text), exactly like theregclass/oidcolumns of the system-information readers.
- SqlFunctions.ITsParseRow
Row shape produced by ts_parse(string?, string?): one token of the document as the named text-search parser split it (
tokidis the token type id,tokenthe token text).
- SqlFunctions.ITsStatRow
Row shape produced by ts_stat(string?): one statistic for a lexeme (
word, document countndoc, total occurrencesnentry).
- SqlFunctions.ITsTokenTypeRow
Row shape produced by ts_token_type(string?): the token types the named text-search parser recognises (
tokid,alias,description).
- SqlFunctions.IUnnestMultiRow<T1, T2>
Row shape produced by unnest<T1, T2>(T1[], T2[]): one column per array, named
value1/value2after the position of the source array. Unequal array lengths are NULL-padded by the server to the longest array.
- SqlFunctions.IUnnestMultiRow<T1, T2, T3>
Row shape produced by unnest<T1, T2, T3>(T1[], T2[], T3[]): the three admitted array positions, NULL-padded to the longest array.
- SqlFunctions.IUnnestOrdinalityMultiRow<T1, T2>
Row shape produced by unnest_with_ordinality<T1, T2>(T1[], T2[]): one column per admitted array plus the shared one-based position (
bigint, so long). Unequal arrays are NULL-padded to the longest.
- SqlFunctions.IUnnestOrdinalityRow<T>
Row shape produced by unnest_with_ordinality<T>(T[]): the element and its one-based position. PostgreSQL types the ordinality column as
bigint, so it is long here.
- SqlFunctions.IUnnestRow<T>
Row shape produced by unnest<T>(T[]): a single column named
unnestholding the array element.
- SqlFunctions.IXmlNodesRow
Row shape produced by xml_nodes(string?, string?): the single
valuecolumn holds one XML node selected by the XQuery (anxmlvalue that is projected further withxml_value/xml_query/xml_exist).
- SqlFunctions.IZerosRow
Row shape produced by zeros(long) and zeros_mt(long): a single column named
zeroholding the byte0(ClickHouseUInt8).
Enums
- AggregateFilterStyle
How a provider attaches a filter to an aggregate. The style is one concept — a predicate over the rows an aggregate sees — rendered differently by each provider family. A dialect opts into filtering by returning anything other than None from AggregateFilterStyle.
- ArrayJoinKind
The ClickHouse
ARRAY JOINvariants. Inner rendersARRAY JOIN, which drops a row whose array is empty; Left rendersLEFT ARRAY JOIN, which keeps it with the array columns left at their defaults.
- BulkInsertMode
Selects the execution path of a bulk insert.
- BulkInsertTargetKind
The kind of table a bulk insert targets.
- DurationUnit
The unit in which a TimeSpan property is stored when the provider has no native interval/time-of-day type and the value is kept in an integer column. Providers with a native duration type (PostgreSQL
interval, MySQL/MariaDBTIME) ignore the unit and store the value natively; Ticks is the unit used when none is declared.
- EagerLoadMode
Selects how the collections declared with
LoadWithare loaded. The mode belongs to the whole builder: an explicit value applies to every declared collection, including those declared before it, while Default inherits the current choice.
- ExtremeRowTies
Which rows survive a
SelectWhereMax/SelectWhereMinquery: One keeps a single extreme row, All keeps every row tied on the extreme value.
- ForJsonMode
How SQL Server shapes the result set when it is rendered as JSON.
- ForXmlMode
How SQL Server shapes the result set when it is rendered as XML.
- GroupingType
A super-aggregate modifier applied to a
GROUP BYlist.None = 0keeps the default so unset commands and the existing plan hashes are unaffected.
- IndexHintKind
The intent of a table index hint: prefer an index (
USE INDEX/INDEXED BY), force it (FORCE INDEX), or suppress index use (IGNORE INDEX/NOT INDEXED).
- JoinStrictness
Optional join modifier that selects which matching right-hand row survives. Only ClickHouse understands these; every other dialect supports just Default. Rendered by MakeJoinKeyword(JoinType, JoinStrictness, bool, KeywordCase) and gated by SupportsJoinStrictness.
- JoinType
The kind of join connecting a left and right source. Numeric values are part of the plan hash and must stay stable.
- JsonColumnStorage
The storage form of a property mapped to a JSON column.
- JsonStreamMode
The container shape of a JSON stream: Array wraps every row in one JSON array, NdJson writes one standalone JSON value per line.
- KeywordCase
The letter case in which SQL keywords are emitted. Function names, identifiers, string literals, type names and raw SQL are never affected. Configure the context-wide default with
DataContextBuilder.UseKeywordCaseand override it for a single query withEntityBuilder<TEntity>.WithKeywordCase.
- LockMode
Row-locking strength for a trailing
FOR UPDATE/FOR SHAREclause.
- LockWaitMode
How a row lock behaves when the requested row is already locked by another transaction.
- MySqlFormatKind
The format family of MySQL's
GET_FORMATfunction, used as the first argument ofget_format. The value is rendered as the bare keyword (DATE,TIME,DATETIME) and must be a compile-time constant.
- MySqlWeightStringCast
The cast target of the optional
AS {CHAR|BINARY}(N)clause of MySQL'sWEIGHT_STRINGfunction, used by the cast/length overload ofweight_string.
- NullSafeComparisonDisposition
How one form of the explicit null-safe comparison (
is distinct from/is not distinct from) can be rendered by a dialect.
- NullsPosition
Where SQL
NULLvalues are placed in anORDER BYkey relative to non-null values.
- OrderDirection
The direction of a single
ORDER BYkey.
- PivotAggregate
The aggregate a
PIVOTapplies to each pivoted cell. T-SQL restricts the aggregate to one of these five functions.
- PrepareFromSqlMode
Flags controlling how raw SQL prepared through
PrepareFromSqlis executed. Replaces the pair ofnonStreamUsing/storeInCachebooleans that used to trail the parameter list.
- PreparedCommandCache
Selects how a prepared query command owns its underlying ADO.NET command across executions.
- QueryComponentContribution
The kind of structural contribution a query component makes to a command. Additive predicates are combined with the source condition; an exclusive row-source reshape replaces the row source and at most one such slot may be present.
- QueryPreparationHavingMode
The three-state handling of the effective HAVING clause by a grouping contribution.
- RelationshipKind
The cardinality of a declared navigation relationship.
- StringTrimKind
Which side of a string Trim() removes whitespace from.
- TableFunctionSchema
Where the result-schema of a table function is rendered, when it is derived from the mapped row type (ResultSchema). The listed providers recognize the corresponding native form; a provider that cannot express it rejects the source with a NotSupportedException.
- TableSampleMethod
Sampling algorithm for a
TABLESAMPLEtable modifier.
- TempTableOnCommit
The action a provider takes on the rows of a temporary table created with
ON COMMITwhen the creating transaction commits.
- TemporalKind
Which
FOR SYSTEM_TIMEtemporal clause to apply to a table.
- UnionType
The kind of set operation joining two queries.
None = 0and the original Distinct/All values keep their numeric assignment so existing serialized values and plan hashes stay stable; the INTERSECT/EXCEPT members are appended.
- WindowFrameBoundKind
The kind of a single frame boundary.
- WindowFrameExclusion
A frame exclusion (
EXCLUDE ...) that removes rows around the current row from the frame even when they fall inside the frame boundaries.
- WindowFrameType
Which SQL frame unit a WindowFrame uses.
Delegates
- CreateEnumeratorDelegate<TResult>
Creates (or re-initialises) the async enumerator that reads an in-memory query result. Gives a name and XML documentation to the shape that was previously an anonymous Func<T1, T2, T3, T4, TResult>.