Class MigrationExpressionCompiler

Assembly: redb.Core.Pro.dll

Expression to SQL compiler for migrations.
Generates UPDATE with JOIN on _values instead of PVT.
Example:
Expression: p => p.Quantity * p.Price
SQL: UPDATE _values target SET _numeric = (
SELECT v1._long * v2._numeric
FROM _values v1 JOIN _values v2 ON v1._id_object = v2._id_object
WHERE v1._id_structure = 123 AND v2._id_structure = 124
AND v1._id_object = target._id_object
)
WHERE target._id_structure = 125

public class MigrationExpressionCompiler

Inheritance

ObjectMigrationExpressionCompiler

Methods

CompileComputedAsync(long, string, LambdaExpression)

Compile ComputedFrom expression to UPDATE SQL

public Task<MigrationSql> CompileComputedAsync(long schemeId, string targetPropertyName, LambdaExpression expression)

CompileDefaultValueAsync(long, string, object?)

Compile DefaultValue to UPDATE SQL

public Task<MigrationSql> CompileDefaultValueAsync(long schemeId, string targetPropertyName, object? defaultValue)

CompileTransformAsync(long, string, LambdaExpression)

Compile Transform to UPDATE SQL

public Task<MigrationSql> CompileTransformAsync(long schemeId, string targetPropertyName, LambdaExpression transformer)

Constructors