public override void AppendSql([NotNull] StringBuilder builder, [NotNull] GeneratorContext filterParams) { if (IsValue) { var value = Value; if (value is null) { builder.Append("NULL"); } else { var paramName = filterParams.Add(Value); builder.Append(Dialect.GetParameterReference(paramName)); } } else { if (!_skipBrackets) { builder.Append(Dialect.OpenBracket); } _left.AppendSql(builder, filterParams); builder.Append(" = "); _right.AppendSql(builder, filterParams); if (!_skipBrackets) { builder.Append(Dialect.CloseBracket); } } }
public override void AppendSql([NotNull] StringBuilder builder, [NotNull] GeneratorContext filterParams) { var value = Value; if (value != null) { var paramName = filterParams.Add(value); builder.Append(Dialect.GetParameterReference(paramName)); } else { builder.Append("NULL"); } }
public override void AppendSql([NotNull] StringBuilder builder, [NotNull] GeneratorContext filterParams) { var value = Value; if (value is null) { builder.Append("NULL"); } else if (_parseHelper.IsSimpleType(value.GetType())) { builder.Append(value); } else { var paramName = filterParams.Add(value); builder.Append(Dialect.GetParameterReference(paramName)); } }