public static string FormatDefaultValue(object defaultValue, IQuoter quoter)
 {
     if (DefaultValueIsSqlFunction(defaultValue))
     {
         return(defaultValue.ToString());
     }
     return(quoter.QuoteValue(defaultValue));
 }
Exemple #2
0
 public void CharIsFormattedWithQuotes()
 {
     _quoter.QuoteValue('A')
     .ShouldBe("'A'");
 }
 public void TimeSpanIsFormattedQuotes()
 {
     quoter.QuoteValue(new TimeSpan(1, 2, 13, 65))
     .ShouldBe("'1 2:14:5.0'");
 }
 public void TimeSpanIsFormattedQuotes()
 {
     _quoter.QuoteValue(new TimeSpan(1, 2, 13, 65))
     .ShouldBe("'26:14:05'");
 }
Exemple #5
0
 public void ByteArrayIsFormattedWithQuotes()
 {
     _quoter.QuoteValue(new byte[] { 0, 254, 13, 18, 125, 17 })
     .ShouldBe(@"E'\\x00FE0D127D11'");
 }