本文整理汇总了C#中BerkeleyDB.Internal.DB_TXN类的典型用法代码示例。如果您正苦于以下问题:C# DB_TXN类的具体用法?C# DB_TXN怎么用?C# DB_TXN使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DB_TXN类属于BerkeleyDB.Internal命名空间,在下文中一共展示了DB_TXN类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: get
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;
}
示例2: associate
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;
}
示例3: stat_qam
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;
}
示例4: truncate
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;
}
示例5: put
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);
}
}
示例6: open
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;
}
示例7: key_range
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);
}
}
示例8: Transaction
internal Transaction(DB_TXN txn)
{
dbtxn = txn;
}
示例9: compact
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);
}
}
示例10: txn_begin
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;
}
示例11: dbrename
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;
}
示例12: Transaction
internal Transaction(DB_TXN txn)
{
dbtxn = txn;
dbtoken = null;
}
示例13: remove
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;
}
示例14: open
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);
}
}
示例15: cursor
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;
}