예제 #1
0
 internal int key_range(DB_TXN txn, DatabaseEntry key, DB_KEY_RANGE range, uint flags)
 {
     try {
         int ret;
         ret = libdb_csharpPINVOKE.DB_key_range(swigCPtr, DB_TXN.getCPtr(txn), DBT.getCPtr(DatabaseEntry.getDBT(key)), DB_KEY_RANGE.getCPtr(range), flags);
         DatabaseException.ThrowException(ret);
         return(ret);
     } finally {
         GC.KeepAlive(key);
     }
 }
예제 #2
0
파일: DB.cs 프로젝트: mcandre/db
 internal int key_range(DB_TXN txn, DatabaseEntry key, DB_KEY_RANGE range, uint flags)
 {
     try {
     int ret;
     ret = libdb_csharpPINVOKE.DB_key_range(swigCPtr, DB_TXN.getCPtr(txn), DBT.getCPtr(DatabaseEntry.getDBT(key)), DB_KEY_RANGE.getCPtr(range), flags);
     DatabaseException.ThrowException(ret);
     return ret;
     } finally {
       GC.KeepAlive(key);
     }
 }
예제 #3
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(DB_KEY_RANGE obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }
 internal static HandleRef getCPtr(DB_KEY_RANGE obj)
 {
     return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }
예제 #5
0
파일: BTreeDatabase.cs 프로젝트: mcandre/db
 /// <summary>
 /// Return an estimate of the proportion of keys that are less than,
 /// equal to, and greater than the specified key.
 /// </summary>
 /// <param name="key">The key to search for</param>
 /// <param name="txn">
 /// If the operation is part of an application-specified transaction,
 /// <paramref name="txn"/> is a Transaction object returned from
 /// <see cref="DatabaseEnvironment.BeginTransaction"/>; if
 /// the operation is part of a Berkeley DB Concurrent Data Store group,
 /// <paramref name="txn"/> is a handle returned from
 /// <see cref="DatabaseEnvironment.BeginCDSGroup"/>; otherwise null.
 /// </param>
 /// <returns>
 /// An estimate of the proportion of keys that are less than, equal to,
 /// and greater than the specified key.
 /// </returns>
 public KeyRange KeyRange(DatabaseEntry key, Transaction txn)
 {
     DB_KEY_RANGE range = new DB_KEY_RANGE();
     db.key_range(Transaction.getDB_TXN(txn), key, range, 0);
     return new KeyRange(range);
 }
예제 #6
0
 internal KeyRange(DB_KEY_RANGE keyRange) {
     kr = keyRange;
 }
예제 #7
0
 internal static HandleRef getCPtr(DB_KEY_RANGE obj)
 {
     return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr);
 }