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 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 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 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 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 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 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 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 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 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); } }
private IntPtr stat(DB_TXN txnid, uint flags, ref int err) { return(libdb_csharpPINVOKE.DB_stat(swigCPtr, DB_TXN.getCPtr(txnid), flags, ref err)); }