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);
        }
示例#2
0
 public TNext Set(NullableBooleanCustomColumn column, bool?value)
 {
     return(this.SetGeneric(column, SqQueryBuilder.Literal(value)));
 }
示例#3
0
 //String
 public static ExprStringConcat operator +(ExprValue a, string b)
 => new ExprStringConcat(a, SqQueryBuilder.Literal(b));
示例#4
0
 public static ExprDiv operator /(ExprValue a, double?b)
 => new ExprDiv(a, SqQueryBuilder.Literal(b));
示例#5
0
 public static ExprModulo operator %(ExprValue a, int?b)
 => new ExprModulo(a, SqQueryBuilder.Literal(b));
示例#6
0
 public static ExprSub operator -(ExprValue a, double?b)
 => new ExprSub(a, SqQueryBuilder.Literal(b));
示例#7
0
 public static ExprMul operator *(ExprValue a, double?b)
 => new ExprMul(a, SqQueryBuilder.Literal(b));
示例#8
0
 public TNext Set(GuidTableColumn column, Guid value)
 {
     return(this.SetGeneric(column, SqQueryBuilder.Literal(value)));
 }
示例#9
0
 public TNext Set(StringTableColumn column, string value)
 {
     return(this.SetGeneric(column, SqQueryBuilder.Literal(value)));
 }
示例#10
0
 public TNext Set(Int32TableColumn column, int value)
 {
     return(this.SetGeneric(column, SqQueryBuilder.Literal(value)));
 }
示例#11
0
 public TNext Set(DateTimeTableColumn column, DateTime value)
 {
     return(this.SetGeneric(column, SqQueryBuilder.Literal(value)));
 }
示例#12
0
 public TNext Set(NullableStringCustomColumn column, string?value)
 {
     return(this.SetGeneric(column, SqQueryBuilder.Literal(value)));
 }
示例#13
0
 public TNext Set(NullableDateTimeCustomColumn column, DateTime?value)
 {
     return(this.SetGeneric(column, SqQueryBuilder.Literal(value)));
 }
示例#14
0
 public TNext Set(NullableInt32CustomColumn column, int?value)
 {
     return(this.SetGeneric(column, SqQueryBuilder.Literal(value)));
 }
示例#15
0
 //Double
 public static ExprSum operator +(ExprValue a, double b)
 => new ExprSum(a, SqQueryBuilder.Literal(b));
示例#16
0
 public TNext Set(NullableByteTableColumn column, byte?value)
 {
     return(this.SetGeneric(column, SqQueryBuilder.Literal(value)));
 }
示例#17
0
 public static ExprSum operator +(double a, ExprValue b)
 => new ExprSum(SqQueryBuilder.Literal(a), b);
示例#18
0
 public TNext Set(NullableByteArrayTableColumn column, IReadOnlyList <byte>?value)
 {
     return(this.SetGeneric(column, SqQueryBuilder.Literal(value)));
 }
示例#19
0
 public static ExprSub operator -(double?a, ExprValue b)
 => new ExprSub(SqQueryBuilder.Literal(a), b);
示例#20
0
 public TNext Set(NullableInt64TableColumn column, long?value)
 {
     return(this.SetGeneric(column, SqQueryBuilder.Literal(value)));
 }
示例#21
0
 public static ExprMul operator *(double?a, ExprValue b)
 => new ExprMul(SqQueryBuilder.Literal(a), b);
示例#22
0
 public TNext Set(NullableDecimalTableColumn column, decimal?value)
 {
     return(this.SetGeneric(column, SqQueryBuilder.Literal(value)));
 }
示例#23
0
 public static ExprDiv operator /(double?a, ExprValue b)
 => new ExprDiv(SqQueryBuilder.Literal(a), b);
示例#24
0
        private static string AppendStringEscapeMySql(string original)
        {
            var sql = SqQueryBuilder.Literal(original).ToMySql();

            return(sql.Substring(1, sql.Length - 2));
        }
示例#25
0
 public static ExprModulo operator %(int?a, ExprValue b)
 => new ExprModulo(SqQueryBuilder.Literal(a), b);
示例#26
0
 public CaseThenNext Then(string value) => this.Then(SqQueryBuilder.Literal(value));
示例#27
0
 public static ExprStringConcat operator +(string a, ExprValue b)
 => new ExprStringConcat(SqQueryBuilder.Literal(a), b);
示例#28
0
 public CaseThenNext Then(IReadOnlyList <byte> value) => this.Then(SqQueryBuilder.Literal(value));
示例#29
0
 public UpdateBuilderSetter Set(ExprColumn col, double value) => this.Set(col, SqQueryBuilder.Literal(value));
示例#30
0
 public TNext Set(DoubleCustomColumn column, double value)
 {
     return(this.SetGeneric(column, SqQueryBuilder.Literal(value)));
 }