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/Internal/DB.cs | |
parent | 7a2660ba9cc2dc03a69ddfcfd95369395cc87444 (diff) | |
download | berkeleydb-master.tar.gz |
Diffstat (limited to 'lang/csharp/src/Internal/DB.cs')
-rw-r--r-- | lang/csharp/src/Internal/DB.cs | 100 |
1 files changed, 99 insertions, 1 deletions
diff --git a/lang/csharp/src/Internal/DB.cs b/lang/csharp/src/Internal/DB.cs index f95a7a4b..9e9a09a9 100644 --- a/lang/csharp/src/Internal/DB.cs +++ b/lang/csharp/src/Internal/DB.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.4 + * Version 2.0.12 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -34,6 +34,14 @@ internal class DB : IDisposable { } } + internal DatabaseEntry[] get_partition_keys() { + uint count = 0; + int err = 0; + uint size = 0; + DatabaseEntry[] ret = get_partition_keys(ref count, ref size, ref err); + DatabaseException.ThrowException(err); + return ret; + } internal DBC cursor(DB_TXN txn, uint flags) { int err = 0; DBC ret = cursor(txn, flags, ref err); @@ -81,6 +89,22 @@ internal class DB : IDisposable { return ret; } + internal int get_blob_dir(out string dir) { + int ret; + IntPtr dirp; + ret = get_blob_dir(out dirp); + dir = Marshal.PtrToStringAnsi(dirp); + return ret; + } + + internal int get_blob_sub_dir(out string dir) { + int ret; + IntPtr dirp; + ret = get_blob_sub_dir(out dirp); + dir = Marshal.PtrToStringAnsi(dirp); + return ret; + } + internal int get_dbname(out string filenamep, out string dbnamep) { int ret; IntPtr fp, dp; @@ -318,6 +342,41 @@ internal class DB : IDisposable { return ret; } + internal int get_blob_dir(out IntPtr dir) { + int ret; + ret = libdb_csharpPINVOKE.DB_get_blob_dir(swigCPtr, out dir); + DatabaseException.ThrowException(ret); + return ret; +} + + internal int set_blob_dir(string dir) { + int ret; + ret = libdb_csharpPINVOKE.DB_set_blob_dir(swigCPtr, dir); + DatabaseException.ThrowException(ret); + return ret; +} + + internal int get_blob_sub_dir(out IntPtr dir) { + int ret; + ret = libdb_csharpPINVOKE.DB_get_blob_sub_dir(swigCPtr, out dir); + DatabaseException.ThrowException(ret); + return ret; +} + + internal int get_blob_threshold(ref uint bytes) { + int ret; + ret = libdb_csharpPINVOKE.DB_get_blob_threshold(swigCPtr, ref bytes); + DatabaseException.ThrowException(ret); + return ret; +} + + internal int set_blob_threshold(uint bytes, uint flags) { + int ret; + ret = libdb_csharpPINVOKE.DB_set_blob_threshold(swigCPtr, bytes, flags); + DatabaseException.ThrowException(ret); + return ret; +} + internal int set_bt_compare(BDB_CompareDelegate callback) { int ret; ret = libdb_csharpPINVOKE.DB_set_bt_compare(swigCPtr, callback); @@ -525,6 +584,45 @@ internal class DB : IDisposable { return ret; } + internal void set_msgcall(BDB_MsgcallDelegate db_msgcall_fcn) { + libdb_csharpPINVOKE.DB_set_msgcall(swigCPtr, db_msgcall_fcn); + } + + internal int set_msgfile(string msgfile) { + int ret; + ret = libdb_csharpPINVOKE.DB_set_msgfile(swigCPtr, msgfile); + DatabaseException.ThrowException(ret); + return ret; +} + + private DatabaseEntry[] get_partition_keys(ref uint countp, ref uint sizep, ref int err) { + IntPtr cPtr = libdb_csharpPINVOKE.DB_get_partition_keys(swigCPtr, ref countp, ref sizep, ref err); + if (cPtr == IntPtr.Zero) + return null; + + DatabaseEntry[] ret = new DatabaseEntry[countp - 1]; + IntPtr val; + for (int i = 0; i < (countp - 1); i++) { + val = new IntPtr((IntPtr.Size == 4 ? cPtr.ToInt32() : cPtr.ToInt64()) + i * sizep); + ret[i] = DatabaseEntry.fromDBT(new DBT(val, false)); + } + return ret; +} + + internal int get_partition_parts(ref uint parts) { + int ret; + ret = libdb_csharpPINVOKE.DB_get_partition_parts(swigCPtr, ref parts); + DatabaseException.ThrowException(ret); + return ret; +} + + internal int set_partition(uint parts, IntPtr[] keys, BDB_PartitionDelegate partition) { + int ret; + ret = libdb_csharpPINVOKE.DB_set_partition(swigCPtr, parts, keys, partition); + DatabaseException.ThrowException(ret); + return ret; +} + internal int get_priority(ref uint flags) { int ret; ret = libdb_csharpPINVOKE.DB_get_priority(swigCPtr, ref flags); |