public static string GenerateJsonQuery(QueryModel model)
        {
            var visitor = new LiteCoreQueryModelVisitor();

            visitor.VisitQueryModel(model);
            return(visitor.GetJsonQuery());
        }
        public IEnumerable <T> ExecuteCollection <T>(QueryModel queryModel)
        {
            var visitor = new LiteCoreQueryModelVisitor();

            visitor.VisitQueryModel(queryModel);
            return(new[] { visitor.GetJsonQuery() } as IEnumerable <T>);
        }
        public IEnumerable <T> ExecuteCollection <T>(QueryModel queryModel)
        {
            var visitor = new LiteCoreQueryModelVisitor();

            visitor.VisitQueryModel(queryModel);
            var query = visitor.GetJsonQuery();

            CreateQuery(query);
            while (MoveNext())
            {
                yield return(GetCurrent <T>(visitor.SelectResult));
            }
        }