Class SqlParameterCollector
Parameter collector for safe SQL query generation.
Prevents SQL injection, enables PostgreSQL/MSSQL query plan caching.
Database-agnostic: uses ISqlDialect for parameter formatting.
public class SqlParameterCollector
Inheritance
Properties
BatchPrefix
Statements the batch runs before the statement these parameters belong to, each ending with ';'. Empty unless a
public string BatchPrefix { get; }
Methods
AddParameter(object?)
Adds parameter and returns placeholder via dialect.
public string AddParameter(object? value)
AddParameterWithOffset(object?, int)
Adds parameter with specified index offset.
public string AddParameterWithOffset(object? value, int offset)
GetDebugComment()
Generates debug comment with parameters (like EF Core), followed by .
public string GetDebugComment()
NextTempTableName(string)
A name for a temporary table of this batch, unique within it.
public string NextTempTableName(string stem)