static private void SanityCheckTableReferences(HqlClause clause, HqlFrom from) { if (clause == null || clause.FieldGroup == null) { return; } for (int i = 0; i < clause.FieldGroup.Count; ++i) { if (clause.FieldGroup[i].HasTableReference) { if (!from.ContainsTableReference(clause.FieldGroup[i].TableReference)) { throw new Exception(String.Format("Unable to find table reference for |{0}| in the FROM clause", clause.FieldGroup[i].TableReference)); } } } }
public void Compile() { try { _select = new HqlSelect(_settings); _from = new HqlFrom(); _where = new HqlWhere(HqlWhere.NAME_WHERE); _groupby = new HqlGroupBy(); _having = new HqlHaving(_select); _orderby = new HqlOrderBy(); HqlTokenProcessor processor = new HqlTokenProcessor(_sql, _settings, _references); Compile_Inner(processor); PostCompile(processor); } catch { throw; } }