summaryrefslogtreecommitdiff
path: root/lang/csharp/src/BTreeCursor.cs
diff options
context:
space:
mode:
Diffstat (limited to 'lang/csharp/src/BTreeCursor.cs')
-rw-r--r--lang/csharp/src/BTreeCursor.cs34
1 files changed, 31 insertions, 3 deletions
diff --git a/lang/csharp/src/BTreeCursor.cs b/lang/csharp/src/BTreeCursor.cs
index 616a4b90..6e62c008 100644
--- a/lang/csharp/src/BTreeCursor.cs
+++ b/lang/csharp/src/BTreeCursor.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;
@@ -30,9 +30,9 @@ namespace BerkeleyDB {
/// <param name="keepPosition">
/// If true, the newly created cursor is initialized to refer to the
/// same position in the database as the original cursor (if any) and
- /// hold the same locks (if any). If false, or the original cursor does
+ /// hold the same locks (if any). If false, or if the original cursor does
/// not hold a database position and locks, the created cursor is
- /// uninitialized and will behave like a cursor newly created by
+ /// uninitialized and behaves like a cursor newly created by
/// <see cref="BTreeDatabase.Cursor"/>.</param>
/// <returns>A newly created cursor</returns>
public new BTreeCursor Duplicate(bool keepPosition) {
@@ -235,6 +235,34 @@ namespace BerkeleyDB {
}
/// <summary>
+ /// Create a database stream pointing to a key/value pair where the
+ /// data item is a blob.
+ /// </summary>
+ /// <returns>A newly created database stream</returns>
+ /// <exception cref="DatabaseException">
+ /// Thrown if the data item is not a blob.
+ /// </exception>
+ public DatabaseStream DbStream() {
+ return DbStream(new DatabaseStreamConfig());
+ }
+
+ /// <summary>
+ /// Create a database stream pointing to a key/value pair where the
+ /// data item is a blob with the given configuration.
+ /// </summary>
+ /// <param name="cfg">
+ /// The configuration properties for the database stream.
+ /// </param>
+ /// <returns>A newly created database stream</returns>
+ /// <exception cref="DatabaseException">
+ /// Thrown if the data of the key/value pair it is pointing to is not
+ /// a blob.
+ /// </exception>
+ public DatabaseStream DbStream(DatabaseStreamConfig cfg) {
+ return new DatabaseStream(dbc.db_stream(cfg.flags), cfg);
+ }
+
+ /// <summary>
/// Return the record number associated with the cursor's current
/// position.
/// </summary>