internal int associate(DB_TXN txn, DB sec, BDB_AssociateDelegate callback, uint flags) { int ret; ret = libdb_csharpPINVOKE.DB_associate(swigCPtr, DB_TXN.getCPtr(txn), DB.getCPtr(sec), callback, flags); DatabaseException.ThrowException(ret); return ret; }
private DBC cursor(DB_TXN txn, uint flags, ref int err) { global::System.IntPtr cPtr = libdb_csharpPINVOKE.DB_cursor(swigCPtr, DB_TXN.getCPtr(txn), flags, ref err); DBC ret = (cPtr == global::System.IntPtr.Zero) ? null : new DBC(cPtr, false); return(ret); }
private DB_TXN cdsgroup_begin(ref int err) { IntPtr cPtr = libdb_csharpPINVOKE.DB_ENV_cdsgroup_begin(swigCPtr, ref err); DB_TXN ret = (cPtr == IntPtr.Zero) ? null : new DB_TXN(cPtr, false); return(ret); }
internal int get(DB_TXN txn, uint delta, ref Int64 retp, uint flags) { int ret; ret = libdb_csharpPINVOKE.DB_SEQUENCE_get(swigCPtr, DB_TXN.getCPtr(txn), delta, ref retp, flags); DatabaseException.ThrowException(ret); return ret; }
private DB_TXN txn_begin(DB_TXN parent, uint flags, ref int err) { IntPtr cPtr = libdb_csharpPINVOKE.DB_ENV_txn_begin(swigCPtr, DB_TXN.getCPtr(parent), flags, ref err); DB_TXN ret = (cPtr == IntPtr.Zero) ? null : new DB_TXN(cPtr, false); return(ret); }
internal QueueStatStruct stat_qam(DB_TXN txn, uint flags) { int err = 0; IntPtr ptr = stat(txn, flags, ref err); DatabaseException.ThrowException(err); QueueStatStruct ret = (QueueStatStruct)Marshal.PtrToStructure(ptr, typeof(QueueStatStruct)); libdb_csharp.__os_ufree(null, ptr); return ret; }
internal int log_printf(DB_TXN txn, string str) { int ret; ret = libdb_csharpPINVOKE.DB_ENV_log_printf(swigCPtr, DB_TXN.getCPtr(txn), str); DatabaseException.ThrowException(ret); return(ret); }
internal DB_TXN cdsgroup_begin() { int err = 0; DB_TXN ret = cdsgroup_begin(ref err); DatabaseException.ThrowException(err); return(ret); }
internal int dbrename(DB_TXN txn, string file, string database, string newname, uint flags) { int ret; ret = libdb_csharpPINVOKE.DB_ENV_dbrename(swigCPtr, DB_TXN.getCPtr(txn), file, database, newname, flags); DatabaseException.ThrowException(ret); return(ret); }
internal int get(DB_TXN txn, uint delta, ref Int64 retp, uint flags) { int ret; ret = libdb_csharpPINVOKE.DB_SEQUENCE_get(swigCPtr, DB_TXN.getCPtr(txn), delta, ref retp, flags); DatabaseException.ThrowException(ret); return(ret); }
internal DB_TXN txn_begin(DB_TXN parent, uint flags) { int err = 0; DB_TXN ret = txn_begin(parent, flags, ref err); DatabaseException.ThrowException(err); return(ret); }
internal int associate(DB_TXN txn, DB sec, BDB_AssociateDelegate callback, uint flags) { int ret; ret = libdb_csharpPINVOKE.DB_associate(swigCPtr, DB_TXN.getCPtr(txn), DB.getCPtr(sec), callback, flags); DatabaseException.ThrowException(ret); return(ret); }
internal DBC cursor(DB_TXN txn, uint flags) { int err = 0; DBC ret = cursor(txn, flags, ref err); DatabaseException.ThrowException(err); return(ret); }
internal int truncate(DB_TXN txn, ref uint countp, uint flags) { int ret; ret = libdb_csharpPINVOKE.DB_truncate(swigCPtr, DB_TXN.getCPtr(txn), ref countp, flags); DatabaseException.ThrowException(ret); return(ret); }
internal int exists(DB_TXN txn, DatabaseEntry key, uint flags) { try { int ret; ret = libdb_csharpPINVOKE.DB_exists(swigCPtr, DB_TXN.getCPtr(txn), DBT.getCPtr(DatabaseEntry.getDBT(key)), flags); DatabaseException.ThrowException(ret); return(ret); } finally { GC.KeepAlive(key); } }
internal int key_range(DB_TXN txn, DatabaseEntry key, DB_KEY_RANGE range, uint flags) { try { int ret; ret = libdb_csharpPINVOKE.DB_key_range(swigCPtr, DB_TXN.getCPtr(txn), DBT.getCPtr(DatabaseEntry.getDBT(key)), DB_KEY_RANGE.getCPtr(range), flags); DatabaseException.ThrowException(ret); return(ret); } finally { GC.KeepAlive(key); } }
internal HeapStatStruct stat_heap(DB_TXN txn, uint flags) { int err = 0; IntPtr ptr = stat(txn, flags, ref err); DatabaseException.ThrowException(err); HeapStatStruct ret = (HeapStatStruct)Marshal.PtrToStructure(ptr, typeof(HeapStatStruct)); libdb_csharp.__os_ufree(null, ptr); return(ret); }
internal int open(DB_TXN txn, string file, string database, DBTYPE type, uint flags, int mode) { int ret; ret = libdb_csharpPINVOKE.DB_open(swigCPtr, DB_TXN.getCPtr(txn), file, database, (int)type, flags, mode); if (ret != 0) { close(0); } DatabaseException.ThrowException(ret); return(ret); }
internal int compact(DB_TXN txn, DatabaseEntry start, DatabaseEntry stop, DB_COMPACT cdata, uint flags, DatabaseEntry end) { try { int ret; ret = libdb_csharpPINVOKE.DB_compact(swigCPtr, DB_TXN.getCPtr(txn), DBT.getCPtr(DatabaseEntry.getDBT(start)), DBT.getCPtr(DatabaseEntry.getDBT(stop)), DB_COMPACT.getCPtr(cdata), flags, DBT.getCPtr(DatabaseEntry.getDBT(end))); DatabaseException.ThrowException(ret); return(ret); } finally { GC.KeepAlive(start); GC.KeepAlive(stop); GC.KeepAlive(end); } }
internal int remove(DB_TXN txn, uint flags) { int ret; ret = libdb_csharpPINVOKE.DB_SEQUENCE_remove(swigCPtr, DB_TXN.getCPtr(txn), flags); /* * remove is a handle destructor, regardless of whether the remove * succeeds. Reflect that in the wrapper class. */ swigCPtr = new HandleRef(null, IntPtr.Zero); DatabaseException.ThrowException(ret); return(ret); }
internal int open(DB_TXN txn, DatabaseEntry key, uint flags) { try { int ret; ret = libdb_csharpPINVOKE.DB_SEQUENCE_open(swigCPtr, DB_TXN.getCPtr(txn), DBT.getCPtr(DatabaseEntry.getDBT(key)), flags); if (ret != 0) { close(0); } DatabaseException.ThrowException(ret); return(ret); } finally { GC.KeepAlive(key); } }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(DB_TXN obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }
private IntPtr stat(DB_TXN txnid, uint flags, ref int err) { return libdb_csharpPINVOKE.DB_stat(swigCPtr, DB_TXN.getCPtr(txnid), flags, ref err); }
internal int compact(DB_TXN txn, DatabaseEntry start, DatabaseEntry stop, DB_COMPACT cdata, uint flags, DatabaseEntry end) { try { int ret; ret = libdb_csharpPINVOKE.DB_compact(swigCPtr, DB_TXN.getCPtr(txn), DBT.getCPtr(DatabaseEntry.getDBT(start)), DBT.getCPtr(DatabaseEntry.getDBT(stop)), DB_COMPACT.getCPtr(cdata), flags, DBT.getCPtr(DatabaseEntry.getDBT(end))); DatabaseException.ThrowException(ret); return ret; } finally { GC.KeepAlive(start); GC.KeepAlive(stop); GC.KeepAlive(end); } }
internal int truncate(DB_TXN txn, ref uint countp, uint flags) { int ret; ret = libdb_csharpPINVOKE.DB_truncate(swigCPtr, DB_TXN.getCPtr(txn), ref countp, flags); DatabaseException.ThrowException(ret); return ret; }
private DBC cursor(DB_TXN txn, uint flags, ref int err) { IntPtr cPtr = libdb_csharpPINVOKE.DB_cursor(swigCPtr, DB_TXN.getCPtr(txn), flags, ref err); DBC ret = (cPtr == IntPtr.Zero) ? null : new DBC(cPtr, false); return ret; }
internal int put(DB_TXN txn, DatabaseEntry key, DatabaseEntry data, uint flags) { try { int ret; ret = libdb_csharpPINVOKE.DB_put(swigCPtr, DB_TXN.getCPtr(txn), DBT.getCPtr(DatabaseEntry.getDBT(key)), DBT.getCPtr(DatabaseEntry.getDBT(data)), flags); DatabaseException.ThrowException(ret); return ret; } finally { GC.KeepAlive(key); GC.KeepAlive(data); } }
internal static HandleRef getCPtr(DB_TXN obj) { return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr); }
internal int log_printf(DB_TXN txn, string str) { int ret; ret = libdb_csharpPINVOKE.DB_ENV_log_printf(swigCPtr, DB_TXN.getCPtr(txn), str); DatabaseException.ThrowException(ret); return ret; }
internal int open(DB_TXN txn, string file, string database, DBTYPE type, uint flags, int mode) { int ret; ret = libdb_csharpPINVOKE.DB_open(swigCPtr, DB_TXN.getCPtr(txn), file, database, (int)type, flags, mode); if (ret != 0) close(0); DatabaseException.ThrowException(ret); return ret; }
internal static HandleRef getCPtr(DB_TXN obj) { return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; }
internal DB_TXN txn_begin(DB_TXN parent, uint flags) { int err = 0; DB_TXN ret = txn_begin(parent, flags, ref err); DatabaseException.ThrowException(err); return ret; }
internal int open(DB_TXN txn, DatabaseEntry key, uint flags) { try { int ret; ret = libdb_csharpPINVOKE.DB_SEQUENCE_open(swigCPtr, DB_TXN.getCPtr(txn), DBT.getCPtr(DatabaseEntry.getDBT(key)), flags); if (ret != 0) close(0); DatabaseException.ThrowException(ret); return ret; } finally { GC.KeepAlive(key); } }
private IntPtr stat(DB_TXN txnid, uint flags, ref int err) { return(libdb_csharpPINVOKE.DB_stat(swigCPtr, DB_TXN.getCPtr(txnid), flags, ref err)); }
internal Transaction(DB_TXN txn) { dbtxn = txn; dbtoken = null; }
internal Transaction(DB_TXN txn) { dbtxn = txn; }
internal int dbrename(DB_TXN txn, string file, string database, string newname, uint flags) { int ret; ret = libdb_csharpPINVOKE.DB_ENV_dbrename(swigCPtr, DB_TXN.getCPtr(txn), file, database, newname, flags); DatabaseException.ThrowException(ret); return ret; }
internal DBC cursor(DB_TXN txn, uint flags) { int err = 0; DBC ret = cursor(txn, flags, ref err); DatabaseException.ThrowException(err); return ret; }
internal int key_range(DB_TXN txn, DatabaseEntry key, DB_KEY_RANGE range, uint flags) { try { int ret; ret = libdb_csharpPINVOKE.DB_key_range(swigCPtr, DB_TXN.getCPtr(txn), DBT.getCPtr(DatabaseEntry.getDBT(key)), DB_KEY_RANGE.getCPtr(range), flags); DatabaseException.ThrowException(ret); return ret; } finally { GC.KeepAlive(key); } }
internal int remove(DB_TXN txn, uint flags) { int ret; ret = libdb_csharpPINVOKE.DB_SEQUENCE_remove(swigCPtr, DB_TXN.getCPtr(txn), flags); /* * remove is a handle destructor, regardless of whether the remove * succeeds. Reflect that in the wrapper class. */ swigCPtr = new HandleRef(null, IntPtr.Zero); DatabaseException.ThrowException(ret); return ret; }
private DB_TXN txn_begin(DB_TXN parent, uint flags, ref int err) { IntPtr cPtr = libdb_csharpPINVOKE.DB_ENV_txn_begin(swigCPtr, DB_TXN.getCPtr(parent), flags, ref err); DB_TXN ret = (cPtr == IntPtr.Zero) ? null : new DB_TXN(cPtr, false); return ret; }