diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2015-02-17 17:25:57 +0000 |
---|---|---|
committer | <> | 2015-03-17 16:26:24 +0000 |
commit | 780b92ada9afcf1d58085a83a0b9e6bc982203d1 (patch) | |
tree | 598f8b9fa431b228d29897e798de4ac0c1d3d970 /lang/csharp/src/HashCursor.cs | |
parent | 7a2660ba9cc2dc03a69ddfcfd95369395cc87444 (diff) | |
download | berkeleydb-master.tar.gz |
Diffstat (limited to 'lang/csharp/src/HashCursor.cs')
-rw-r--r-- | lang/csharp/src/HashCursor.cs | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/lang/csharp/src/HashCursor.cs b/lang/csharp/src/HashCursor.cs index 650aab29..60334c55 100644 --- a/lang/csharp/src/HashCursor.cs +++ b/lang/csharp/src/HashCursor.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; @@ -20,6 +20,34 @@ namespace BerkeleyDB { : base(dbc, DatabaseType.HASH, pagesize, p) { } /// <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> /// Create a new cursor that uses the same transaction and locker ID as /// the original cursor. /// </summary> @@ -30,9 +58,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="HashDatabase.Cursor"/>.</param> /// <returns>A newly created cursor</returns> public new HashCursor Duplicate(bool keepPosition) { @@ -78,4 +106,4 @@ namespace BerkeleyDB { base.Add(pair, loc); } } -}
\ No newline at end of file +} |