private static RValueSQL createValue(int sqlType, RawVal rawVal) { return(new RValueSQL() { SqlType = sqlType, Val = rawVal }); }
public static RValueSQL ToRValueSQL(this DateTime value) { RawVal rawVal = new RawVal() { Bigint_val = value.ToEpochMs() }; return(createValue(SQLTypes.TIMESTAMP, rawVal)); }
public static RValueSQL ToRValueSQL(this double value) { RawVal rawVal = new RawVal() { Double_val = value }; return(createValue(SQLTypes.DOUBLE, rawVal)); }
public static RValueSQL ToRValueSQL(this short value) { RawVal rawVal = new RawVal() { Smallint_val = value }; return(createValue(SQLTypes.SMALLINT, rawVal)); }
public static RValueSQL ToRValueSQL(this int value) { RawVal rawVal = new RawVal() { Integer_val = value }; return(createValue(SQLTypes.INTEGER, rawVal)); }
public static RValueSQL ToRValueSQL(this bool value) { RawVal rawVal = new RawVal() { Bool_val = value }; return(createValue(SQLTypes.BOOLEAN, rawVal)); }
public static RValueSQL ToRValueSQL(this long value) { RawVal rawVal = new RawVal() { Bigint_val = value }; return(createValue(SQLTypes.BIGINT, rawVal)); }
public static RValueSQL ToRValueSQL(this string value) { if (string.IsNullOrEmpty(value)) { return(ToRValueSQLNull()); } RawVal rawVal = new RawVal() { String_val = value }; return(createValue(SQLTypes.VARCHAR, rawVal)); }
private static RValueSQL createArray(int sqlType, List <RawVal> values) { ArrayVal arrayVal = new ArrayVal() { SqlType = sqlType, Elements = values }; RawVal rawVal = new RawVal() { Array_val = arrayVal }; return(createValue(SQLTypes.ARRAY, rawVal)); }