Exemple #1
0
        /// <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));
        }
Exemple #2
0
 internal KeyRange(DB_KEY_RANGE keyRange)
 {
     kr = keyRange;
 }