Class PvtSqlGenerator

Assembly: redb.Postgres.Pro.dll

PVT SQL generator for WHERE conditions.
Uses CASE WHEN approach (tested - 15 ms on 15K objects!)
SECURITY: Parameterized SQL queries

public class PvtSqlGenerator

Inheritance

ObjectPvtSqlGenerator

Methods

GenerateExistsClause(IReadOnlyList<FieldInfo>, string, string)

Generates EXISTS with PVT subquery for WHERE condition.

public CompiledPvtQuery GenerateExistsClause(IReadOnlyList<FieldInfo> fields, string whereCondition, string tableAlias = "o")

GenerateNestedDictCte(IReadOnlyList<FieldInfo>, string)

Generates CTE for nested Dictionary fields like AddressBook[home].City.

public string GenerateNestedDictCte(IReadOnlyList<FieldInfo> nestedFields, string tableAlias = "o")

GeneratePvtCte(IReadOnlyList<FieldInfo>, string, string, string?)

Generates CTE-based PVT (NOT correlated - single pass!).

public PvtSqlGenerator.PvtCteResult GeneratePvtCte(IReadOnlyList<FieldInfo> fields, string whereCondition, string schemeIdParam, string? additionalObjectFilter = null)

GeneratePvtSelect(IReadOnlyList<FieldInfo>, string)

Generates PVT subquery for SELECT (data retrieval).

public string GeneratePvtSelect(IReadOnlyList<FieldInfo> fields, string tableAlias = "o")

GetNestedDictFields(IReadOnlyList<FieldInfo>)

Gets nested Dictionary fields that require CTE.

public IReadOnlyList<FieldInfo> GetNestedDictFields(IReadOnlyList<FieldInfo> fields)

GetSimpleFields(IReadOnlyList<FieldInfo>)

Gets simple fields (including simple Dictionary fields) for PVT.

public IReadOnlyList<FieldInfo> GetSimpleFields(IReadOnlyList<FieldInfo> fields)

Constructors