Exemple #1
0
        public Task <Schema> GetSchemaAsync(Query query)
        {
            CheckServiceActive();
            var handler = QueryResolver.Resolve(query);

            return(handler.GetSchemaAsync(new ErlCRUDQueryExecutionContext(this), query));
        }
Exemple #2
0
        public virtual Cursor OpenCursor(Query query)
        {
            var db = GetDatabase();

            var handler = QueryResolver.Resolve(query);
            var context = new MongoDBCRUDQueryExecutionContext(this, db);
            var result  = handler.OpenCursor(context, query);

            return(result);
        }
Exemple #3
0
        public virtual Doc Execute(Query query)
        {
            if (query == null)
            {
                return(null);
            }
            var db      = GetDatabase();
            var handler = QueryResolver.Resolve(query);

            return(handler.ExecuteProcedure(new MongoDbCRUDQueryExecutionContext(this, db), query));
        }
Exemple #4
0
        public virtual Schema GetSchema(Query query)
        {
            if (query == null)
            {
                return(null);
            }

            var db = GetDatabase();

            var handler = QueryResolver.Resolve(query);

            return(handler.GetSchema(new MongoDBCRUDQueryExecutionContext(this, db), query));
        }
Exemple #5
0
        public virtual int ExecuteWithoutFetch(params Query[] queries)
        {
            if (queries == null)
            {
                return(0);
            }

            var db       = GetDatabase();
            var affected = 0;

            foreach (var query in queries)
            {
                var handler = QueryResolver.Resolve(query);
                affected += handler.ExecuteWithoutFetch(new MongoDBCRUDQueryExecutionContext(this, db), query);
            }

            return(affected);
        }
Exemple #6
0
        public virtual List <RowsetBase> Load(params Query[] queries)
        {
            CheckServiceActive();
            var result = new List <RowsetBase>();

            if (queries == null)
            {
                return(result);
            }

            foreach (var query in queries)
            {
                var handler = QueryResolver.Resolve(query);
                var rowset  = handler.Execute(new ErlCRUDQueryExecutionContext(this), query, false);
                result.Add(rowset);
            }

            return(result);
        }
Exemple #7
0
        public virtual List <RowsetBase> Load(params Query[] queries)
        {
            var db = GetDatabase();

            var result = new List <RowsetBase>();

            if (queries == null)
            {
                return(result);
            }

            foreach (var query in queries)
            {
                var handler = QueryResolver.Resolve(query);
                var rowset  = handler.Execute(new MongoDBCRUDQueryExecutionContext(this, db), query, false);
                result.Add(rowset);
            }

            return(result);
        }