public override void VisitIfTempTableExists(StatementIfTempTableExists statementIfTempTableExists) { var tableName = TSqlExporter.Default.ToSql(statementIfTempTableExists.Table); tableName = "tempdb.." + tableName; var condition = SqQueryBuilder.IsNotNull(new ExprScalarFunction(null, new ExprFunctionName(true, "OBJECT_ID"), new[] { SqQueryBuilder.Literal(tableName) })); new StatementIf(condition, statementIfTempTableExists.Statements, statementIfTempTableExists.ElseStatements).Accept(this); }
public TNext Set(NullableBooleanCustomColumn column, bool?value) { return(this.SetGeneric(column, SqQueryBuilder.Literal(value))); }
//String public static ExprStringConcat operator +(ExprValue a, string b) => new ExprStringConcat(a, SqQueryBuilder.Literal(b));
public static ExprDiv operator /(ExprValue a, double?b) => new ExprDiv(a, SqQueryBuilder.Literal(b));
public static ExprModulo operator %(ExprValue a, int?b) => new ExprModulo(a, SqQueryBuilder.Literal(b));
public static ExprSub operator -(ExprValue a, double?b) => new ExprSub(a, SqQueryBuilder.Literal(b));
public static ExprMul operator *(ExprValue a, double?b) => new ExprMul(a, SqQueryBuilder.Literal(b));
public TNext Set(GuidTableColumn column, Guid value) { return(this.SetGeneric(column, SqQueryBuilder.Literal(value))); }
public TNext Set(StringTableColumn column, string value) { return(this.SetGeneric(column, SqQueryBuilder.Literal(value))); }
public TNext Set(Int32TableColumn column, int value) { return(this.SetGeneric(column, SqQueryBuilder.Literal(value))); }
public TNext Set(DateTimeTableColumn column, DateTime value) { return(this.SetGeneric(column, SqQueryBuilder.Literal(value))); }
public TNext Set(NullableStringCustomColumn column, string?value) { return(this.SetGeneric(column, SqQueryBuilder.Literal(value))); }
public TNext Set(NullableDateTimeCustomColumn column, DateTime?value) { return(this.SetGeneric(column, SqQueryBuilder.Literal(value))); }
public TNext Set(NullableInt32CustomColumn column, int?value) { return(this.SetGeneric(column, SqQueryBuilder.Literal(value))); }
//Double public static ExprSum operator +(ExprValue a, double b) => new ExprSum(a, SqQueryBuilder.Literal(b));
public TNext Set(NullableByteTableColumn column, byte?value) { return(this.SetGeneric(column, SqQueryBuilder.Literal(value))); }
public static ExprSum operator +(double a, ExprValue b) => new ExprSum(SqQueryBuilder.Literal(a), b);
public TNext Set(NullableByteArrayTableColumn column, IReadOnlyList <byte>?value) { return(this.SetGeneric(column, SqQueryBuilder.Literal(value))); }
public static ExprSub operator -(double?a, ExprValue b) => new ExprSub(SqQueryBuilder.Literal(a), b);
public TNext Set(NullableInt64TableColumn column, long?value) { return(this.SetGeneric(column, SqQueryBuilder.Literal(value))); }
public static ExprMul operator *(double?a, ExprValue b) => new ExprMul(SqQueryBuilder.Literal(a), b);
public TNext Set(NullableDecimalTableColumn column, decimal?value) { return(this.SetGeneric(column, SqQueryBuilder.Literal(value))); }
public static ExprDiv operator /(double?a, ExprValue b) => new ExprDiv(SqQueryBuilder.Literal(a), b);
private static string AppendStringEscapeMySql(string original) { var sql = SqQueryBuilder.Literal(original).ToMySql(); return(sql.Substring(1, sql.Length - 2)); }
public static ExprModulo operator %(int?a, ExprValue b) => new ExprModulo(SqQueryBuilder.Literal(a), b);
public CaseThenNext Then(string value) => this.Then(SqQueryBuilder.Literal(value));
public static ExprStringConcat operator +(string a, ExprValue b) => new ExprStringConcat(SqQueryBuilder.Literal(a), b);
public CaseThenNext Then(IReadOnlyList <byte> value) => this.Then(SqQueryBuilder.Literal(value));
public UpdateBuilderSetter Set(ExprColumn col, double value) => this.Set(col, SqQueryBuilder.Literal(value));
public TNext Set(DoubleCustomColumn column, double value) { return(this.SetGeneric(column, SqQueryBuilder.Literal(value))); }