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); } }
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); } }
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; }
/// <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); }
internal KeyRange(DB_KEY_RANGE keyRange) { kr = keyRange; }
internal static HandleRef getCPtr(DB_KEY_RANGE obj) { return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr); }