private string[] GetWhereClauses(string query)
        {
            SearchConditionNormalizer cn = new SearchConditionNormalizer();

            var select = CreateSelect(query);
            var res = new List<string>();

            foreach (var qs in select.EnumerateQuerySpecifications())
            {
                cn.NormalizeQuerySpecification(qs);

                // TODO use qs.SourceTableReferences ???
                foreach (var tr in qs.EnumerateSourceTableReferences(true))
                {
                    WhereClause where = cn.GenerateWhereClauseSpecificToTable(tr);

                    if (where != null)
                    {
                        var cg = new SqlServerCodeGenerator();
                        cg.ResolveNames = true;

                        var sw = new StringWriter();
                        cg.Execute(sw, where);

                        res.Add(sw.ToString());
                    }
                    else
                    {
                        res.Add("");
                    }
                }
            }

            return res.ToArray();
        }