summaryrefslogtreecommitdiff
path: root/lang/csharp/src/SecondaryBTreeDatabase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'lang/csharp/src/SecondaryBTreeDatabase.cs')
-rw-r--r--lang/csharp/src/SecondaryBTreeDatabase.cs49
1 files changed, 27 insertions, 22 deletions
diff --git a/lang/csharp/src/SecondaryBTreeDatabase.cs b/lang/csharp/src/SecondaryBTreeDatabase.cs
index b685747d..b89f66df 100644
--- a/lang/csharp/src/SecondaryBTreeDatabase.cs
+++ b/lang/csharp/src/SecondaryBTreeDatabase.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -54,13 +54,13 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
- /// will be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
/// be transactionally protected during its open.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -85,18 +85,18 @@ namespace BerkeleyDB {
/// object that created it, in circumstances where doing so is safe. If
/// <paramref name="Filename"/> is null and
/// <paramref name="DatabaseName"/> is non-null, the database can be
- /// opened by other threads of control and will be replicated to client
+ /// opened by other threads of control and be replicated to client
/// sites in any replication group.
/// </para>
/// <para>
/// If <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
- /// will be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
/// be transactionally protected during its open.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -127,15 +127,15 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <paramref name="txn"/> is null, but
- /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation will
- /// be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
- /// be transactionally protected during its open. Also note that the
+ /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
+ /// be transactionally protected during its open. The
/// transaction must be committed before the object is closed.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -168,20 +168,20 @@ namespace BerkeleyDB {
/// object that created it, in circumstances where doing so is safe. If
/// <paramref name="Filename"/> is null and
/// <paramref name="DatabaseName"/> is non-null, the database can be
- /// opened by other threads of control and will be replicated to client
+ /// opened by other threads of control and be replicated to client
/// sites in any replication group.
/// </para>
/// <para>
/// If <paramref name="txn"/> is null, but
- /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation will
- /// be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
- /// be transactionally protected during its open. Also note that the
+ /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
+ /// be transactionally protected during its open. The
/// transaction must be committed before the object is closed.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -230,18 +230,23 @@ namespace BerkeleyDB {
#region Callbacks
private static int doDupCompare(
- IntPtr dbp, IntPtr dbt1p, IntPtr dbt2p) {
+ IntPtr dbp, IntPtr dbt1p, IntPtr dbt2p, IntPtr locp) {
DB db = new DB(dbp, false);
DBT dbt1 = new DBT(dbt1p, false);
DBT dbt2 = new DBT(dbt2p, false);
+ if (locp != IntPtr.Zero)
+ locp = IntPtr.Zero;
return ((SecondaryBTreeDatabase)(db.api_internal)).DupCompare(
DatabaseEntry.fromDBT(dbt1), DatabaseEntry.fromDBT(dbt2));
}
- private static int doCompare(IntPtr dbp, IntPtr dbtp1, IntPtr dbtp2) {
+ private static int doCompare(IntPtr dbp,
+ IntPtr dbtp1, IntPtr dbtp2, IntPtr locp) {
DB db = new DB(dbp, false);
DBT dbt1 = new DBT(dbtp1, false);
DBT dbt2 = new DBT(dbtp2, false);
+ if (locp != IntPtr.Zero)
+ locp = IntPtr.Zero;
SecondaryBTreeDatabase tmp =
(SecondaryBTreeDatabase)db.api_internal;
return tmp.compareHandler(
@@ -325,7 +330,7 @@ namespace BerkeleyDB {
}
/// <summary>
- /// If false, empty pages will not be coalesced into higher-level pages.
+ /// If false, empty pages are not coalesced into higher-level pages.
/// </summary>
public bool ReverseSplit {
get {