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 function, object fieldValue, object fieldValue2, SqlWhereComparison.SqlComparer comparator) { foreach (SqlTable table in Tables) { if (table.Name.ToUpper() == BaseTable.ToUpper()) { SqlField newfield = new SqlField(function.ToUpper(), null, null, table, true, false); return(AddWhereParameter(andOR, newfield, fieldValue, fieldValue2, comparator)); } } return(null); }
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); }
public SqlWhere AddWhereParameter(SqlWhereAndorOptions.SqlWhereAndor andor, string tableName, string fieldName, object fieldValue, object fieldValue2, SqlWhereComparison.SqlComparer comparator) { foreach (SqlField field in Fields) { if (field.Name == fieldName.ToUpper() && field.Table.Name == tableName.ToUpper()) { return(AddWhereParameter(andor, field, fieldValue, fieldValue2, comparator)); } } foreach (SqlTable table in Tables) { if (table.Name == tableName.ToUpper()) { SqlField newfield = new SqlField(fieldName.ToUpper(), null, null, table, false, false); return(AddWhereParameter(andor, newfield, fieldValue, fieldValue2, comparator)); } } return(null); }
public SqlWhere AddWhereParameter(SqlWhereAndorOptions.SqlWhereAndor andor, SqlField field, object fieldValue, SqlWhereComparison.SqlComparer comparator) { return(AddWhereParameter(andor, field, fieldValue, null, comparator)); }
public SqlWhere AddWhereParameter(SqlWhereAndorOptions.SqlWhereAndor andOR, string function, object fieldValue, SqlWhereComparison.SqlComparer comparator) { return(AddWhereParameter(SqlWhereAndorOptions.SqlWhereAndor.And, function, fieldValue, null, comparator)); }
public SqlWhere AddWhereParameter(SqlWhereAndorOptions.SqlWhereAndor andOR, string fieldName, List <object> inValues) { return(AddWhereParameter(andOR, fieldName, BaseTable, inValues)); }
public SqlWhere AddSubWhere(SqlWhereAndorOptions.SqlWhereAndor andOr, string tableName, string fieldName, object fieldValue, SqlWhereComparison.SqlComparer comparator) { return(AddSubWhere(andOr, tableName, fieldName, fieldValue, null, comparator)); }