Exemple #1
0
 public static void SetNullableDouble(Inserter inserter, double?value)
 {
     if (value.HasValue)
     {
         inserter.Add(value.Value);
     }
     else
     {
         inserter.AddNull();
     }
 }
Exemple #2
0
 public static void SetNullableBoolean(Inserter inserter, bool?value)
 {
     if (value.HasValue)
     {
         inserter.Add(value.Value);
     }
     else
     {
         inserter.AddNull();
     }
 }
Exemple #3
0
 public static void SetNullableInt64(Inserter inserter, long?value)
 {
     if (value.HasValue)
     {
         inserter.Add(value.Value);
     }
     else
     {
         inserter.AddNull();
     }
 }
Exemple #4
0
 public static void SetNullableInt16(Inserter inserter, short?value)
 {
     if (value.HasValue)
     {
         inserter.Add(value.Value);
     }
     else
     {
         inserter.AddNull();
     }
 }
Exemple #5
0
 public static void SetString(Inserter inserter, string value)
 {
     if (value == null)
     {
         inserter.AddNull();
     }
     else
     {
         inserter.Add(value);
     }
 }
Exemple #6
0
 public static void SetNullableDateTime(Inserter inserter, DateTime?value)
 {
     if (value.HasValue)
     {
         inserter.Add(new Timestamp(value.Value.Year, value.Value.Month, value.Value.Day,
                                    value.Value.Hour, value.Value.Minute, value.Value.Second, value.Value.Millisecond * 1000));
     }
     else
     {
         inserter.AddNull();
     }
 }
Exemple #7
0
 public static void SetBoolean(Inserter inserter, bool value)
 {
     inserter.Add(value);
 }
Exemple #8
0
 public static void SetDateTime(Inserter inserter, DateTime value)
 {
     inserter.Add(new Timestamp(value.Year, value.Month, value.Day, value.Hour, value.Minute, value.Second, value.Millisecond * 1000));
 }
Exemple #9
0
 public static void SetDouble(Inserter inserter, double value)
 {
     inserter.Add(value);
 }
Exemple #10
0
 public static void SetInt64(Inserter inserter, long value)
 {
     inserter.Add(value);
 }
Exemple #11
0
 public static void SetInt32(Inserter inserter, int value)
 {
     inserter.Add(value);
 }
Exemple #12
0
 public static void SetInt16(Inserter inserter, short value)
 {
     inserter.Add(value);
 }