public SqlWhere(string tableName, string fieldName, object value, SqlWhereComparison.SqlComparer comparator) { this.MockTableName = tableName; this.MockFieldName = fieldName; this.MockValue = value; this.MockComparator = SqlWhereComparison.GetSqlComparor(comparator); MockInitialization = true; }
public SqlWhere AddWhereParameter(SqlWhereAndorOptions.SqlWhereAndor andor, SqlField field, object fieldValue1, object fieldValue2, SqlWhereComparison.SqlComparer comparator) { SqlWhere newwhere = new SqlWhere(ref Tables, ref Fields); newwhere.Andor = SqlWhereAndorOptions.GetSqlwhereandor(andor); newwhere.Field = field; newwhere.Value1 = fieldValue1; newwhere.Value2 = fieldValue2; newwhere.Comparator = SqlWhereComparison.GetSqlComparor(comparator); InnerWheres.Add(newwhere); return(newwhere); }
public SqlWhere AddWhereParameter(SqlWhereAndorOptions.SqlWhereAndor andOR, string fieldName, string tableName, List <object> inValues) { SqlField field = FindOrGenerateField(fieldName, BaseTable); SqlWhere newwhere = new SqlWhere(ref Tables, ref Fields); newwhere.Andor = SqlWhereAndorOptions.GetSqlwhereandor(andOR); newwhere.Field = field; newwhere.InList = inValues; newwhere.Comparator = SqlWhereComparison.GetSqlComparor(SqlWhereComparison.SqlComparer.In); Wheres.Add(newwhere); return(newwhere); }
public SqlWhere AddSubWhere(SqlWhereAndorOptions.SqlWhereAndor andOr, SqlField field, object fieldValue1, object fieldValue2, SqlWhereComparison.SqlComparer comparator) { SqlWhere newwhere = new SqlWhere(ref Tables, ref Fields); newwhere.Andor = SqlWhereAndorOptions.GetSqlwhereandor(andOr); newwhere.Field = field; newwhere.Value1 = fieldValue1; newwhere.Value2 = fieldValue2; newwhere.Comparator = SqlWhereComparison.GetSqlComparor(comparator); if (newwhere.Comparator == "<>" && fieldValue1 == null) { newwhere.Comparator = "IS NOT"; } Wheres[Wheres.Count - 1].InnerWheres.Add(newwhere); return(newwhere); }