Beispiel #1
0
        public QueryHandle(Collection collection, byte[] queryAsBson) : base(true)
        {
            Collection = collection;
            var database = collection.Database;

            _functions = database.Library.Functions.Query;

            handle = _functions.Create(database.DatabaseHandle, queryAsBson);

            if (IsInvalid)
            {
                EjdbException.FromDatabase(database, "Failed to create query");
            }
        }
Beispiel #2
0
 public Functions(LibraryHandle handle)
 {
     Database   = new DatabaseFunctions(handle);
     Collection = new CollectionFunctions(handle);
     Query      = new QueryFunctions(handle);
 }
Beispiel #3
0
 public QueryLogBuffer(QueryFunctions functions) : base(true)
 {
     _functions = functions;
     handle     = _functions.NewBuffer();
 }
Beispiel #4
0
 protected override bool ReleaseHandle()
 {
     _functions.Delete(handle);
     _functions = null;
     return(true);
 }