private SqlInfo CheckExpression(SqlInfo expression) { if (expression.Sql is ISearchCondition) { expression.Sql = Builder.Convert( this, new SqlFunction(typeof(bool), "CASE", expression.Sql, new SqlValue(true), new SqlValue(false))); } return(expression); }
private void SetInfo(SqlInfo info) { info.Query = Select; if (info.Sql == Select) { info.Index = Select.Select.Columns.Count - 1; } else { info.Index = Select.Select.Add(info.Sql); } }
public bool CompareLastMember(SqlInfo info) { return (Members.Count > 0 && info.Members.Count > 0 && Members[Members.Count - 1].EqualsTo(info.Members[info.Members.Count - 1])); }
public bool CompareMembers(SqlInfo info) { return(Members.Count == info.Members.Count && !Members.Where((t, i) => !t.EqualsTo(info.Members[i])).Any()); }