public void Build(DbCommandBuilder builder, IServiceProvider serviceProvider) { builder.SqlBuilder.Write("("); lhs.Build(builder, serviceProvider); builder.SqlBuilder.Write(")::"); builder.SqlBuilder.Write(columnType.Sql); }
public void Build(DbCommandBuilder builder, IServiceProvider serviceProvider) { value.Build(builder, serviceProvider); if (Alias != null) { builder.SqlBuilder.Write(" as "); builder.SqlBuilder.Write(Alias); } }
public static void Build(IDbFragment value, string op, bool prefix, DbCommandBuilder builder, IServiceProvider serviceProvider) { if (prefix) { builder.SqlBuilder.Write("("); builder.SqlBuilder.Write(op); builder.SqlBuilder.Write(" ("); value.Build(builder, serviceProvider); builder.SqlBuilder.Write(" ))"); } else { builder.SqlBuilder.Write("(("); value.Build(builder, serviceProvider); builder.SqlBuilder.Write(") "); builder.SqlBuilder.Write(op); builder.SqlBuilder.Write(")"); } }
public override void Build(DbCommandBuilder builder, IServiceProvider serviceProvider) { var environmentOption = serviceProvider.GetRequiredService <EnvironmentOption>(); var oldEnvironmentOption = environmentOption.Clone(); environmentOption.IsComparingEquality = true; if (lhs == null || lhs is IConstantValue lhsConstant && lhsConstant.Value == null) { builder.SqlBuilder.Write("(("); rhs.Build(builder, serviceProvider); builder.SqlBuilder.Write($") is{(equal ? "" : " not")} null)"); }
public static void Build(IDbFragment lhs, string op, IDbFragment rhs, DbCommandBuilder builder, IServiceProvider serviceProvider) { builder.SqlBuilder.Write("("); if (op == "=") { if (lhs is ConstantValue lhsConstant && lhsConstant.Value == null) { rhs.Build(builder, serviceProvider); builder.SqlBuilder.Write(" is null"); } else if (rhs is ConstantValue rhsConstant && rhsConstant.Value == null) { lhs.Build(builder, serviceProvider); builder.SqlBuilder.Write(" is null"); } }
public override void Build(DbCommandBuilder builder, IServiceProvider serviceProvider) { dbFragment.Build(builder, serviceProvider); }
public void Build(DbCommandBuilder builder, IServiceProvider serviceProvider) { fragment.Build(builder, serviceProvider); }