Class 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.
public sealed class DbPreparedQueryCommand<TResult> : PreparedQueryCommand<TResult, IDataRecord>, IPreparedQueryCommand<TResult>
Type Parameters
TResult
- Inheritance
-
PreparedQueryCommand<TResult, IDataRecord>DbPreparedQueryCommand<TResult>
- Implements
-
IPreparedQueryCommand<TResult>
- Inherited Members
- Extension Methods
Fields
Behavior
The CommandBehavior requested from the underlying reader. A buffered command uses
SingleRow or 0; a streaming LOB command additionally sets
SequentialAccess.
public readonly CommandBehavior Behavior
Field Value
NeedsParamRefresh
Whether parameter values must be refreshed before each execution rather than assuming the values baked into the plan are still current.
public readonly bool NeedsParamRefresh
Field Value
NoParams
Whether the command has no parameters, allowing parameter binding to be skipped.
public readonly bool NoParams
Field Value
SqlStmt
The SQL text the command was prepared with, when known.
public readonly string? SqlStmt