public DWhere(object keyValues) { MultiField = new Dictionary <string, FieldVariant>(); foreach (var item in keyValues.GetType().GetRuntimeProperties()) { var value = new FieldVariant(item.GetValue(keyValues)); MultiField.Add(item.Name, value); } }
public DInsert(string table, object keyValues, bool replace = false) { Table = table; MySQLReplace = replace; MultiField = new Dictionary <string, FieldVariant>(); foreach (var item in keyValues.GetType().GetRuntimeProperties()) { var value = new FieldVariant(item.GetValue(keyValues)); MultiField.Add(item.Name, value); } }
public DWhere(WhereType type, string fieldName, params object[] values) { WhereType = type; FieldName = fieldName; if (type == WhereType.Field) { CompareTo = Convert.ToString(GetParamVal(values, 0)); return; } var firstValue = new FieldVariant(GetParamVal(values, 0)); if (type == WhereType.Equal) { CompareTo = firstValue.Value(); } }
public FieldVal(string field, DateTime val) { FieldName = field; FieldValue = new FieldVariant(val); }
public FieldVal(string field, double val) { FieldName = field; FieldValue = new FieldVariant(val); }