private int IsDuplicate(ref ValueStructure left, ref ValueStructure right) { return(_duplicatesComparer.Compare(left.GetBytes(), right.GetBytes())); }
int INativeLibraryFacade.mdb_del(IntPtr txn, uint dbi, ref ValueStructure key, ref ValueStructure data) { return(Native64BitLibraryFacade.mdb_del(txn, dbi, ref key, ref data)); }
private static extern int mdb_put(IntPtr txn, UInt32 dbi, ref ValueStructure key, ref ValueStructure data, PutOptions flags);
private static extern int mdb_cursor_get(IntPtr cursor, ref ValueStructure key, ref ValueStructure data, CursorOperation op);
int INativeLibraryFacade.mdb_del(IntPtr txn, uint dbi, ref ValueStructure key, IntPtr data) { return FallbackLibraryFacade.mdb_del(txn, dbi, ref key, data); }
int INativeLibraryFacade.mdb_cursor_put(IntPtr cursor, ValueStructure key, ValueStructure data, PutOptions flags) { return FallbackLibraryFacade.mdb_cursor_put(cursor, key, data, flags); }
private static extern int mdb_del(IntPtr txn, UInt32 dbi, ref ValueStructure key, ref ValueStructure data);
int INativeLibraryFacade.mdb_get(IntPtr txn, uint dbi, ref ValueStructure key, out ValueStructure data) { return FallbackLibraryFacade.mdb_get(txn, dbi, ref key, out data); }
int INativeLibraryFacade.mdb_cursor_get(IntPtr cursor, ref ValueStructure key, ref ValueStructure data, CursorOperation op) { return(FallbackLibraryFacade.mdb_cursor_get(cursor, ref key, ref data, op)); }
int INativeLibraryFacade.mdb_cursor_put(IntPtr cursor, ValueStructure key, ValueStructure data, PutOptions flags) { return(FallbackLibraryFacade.mdb_cursor_put(cursor, key, data, flags)); }
int INativeLibraryFacade.mdb_del(IntPtr txn, uint dbi, ref ValueStructure key, IntPtr data) { return(FallbackLibraryFacade.mdb_del(txn, dbi, ref key, data)); }
int INativeLibraryFacade.mdb_put(IntPtr txn, uint dbi, ref ValueStructure key, ref ValueStructure data, PutOptions flags) { return(FallbackLibraryFacade.mdb_put(txn, dbi, ref key, ref data, flags)); }
int INativeLibraryFacade.mdb_get(IntPtr txn, uint dbi, ref ValueStructure key, out ValueStructure data) { return(FallbackLibraryFacade.mdb_get(txn, dbi, ref key, out data)); }
int INativeLibraryFacade.mdb_del(IntPtr txn, uint dbi, ref ValueStructure key, ref ValueStructure data) { return Native64BitLibraryFacade.mdb_del(txn, dbi, ref key, ref data); }
public static extern int mdb_get(IntPtr txn, UInt32 dbi, ref ValueStructure key, out ValueStructure data); //OK
private static extern int mdb_cursor_put(IntPtr cursor, ValueStructure key, ValueStructure data, PutOptions flags);
public static extern int mdb_put(IntPtr txn, UInt32 dbi, ref ValueStructure key, ref ValueStructure data, PutOptions flags); //OK
int INativeLibraryFacade.mdb_put(IntPtr txn, uint dbi, ref ValueStructure key, ref ValueStructure data, PutOptions flags) { return FallbackLibraryFacade.mdb_put(txn, dbi, ref key, ref data, flags); }
public static extern int mdb_del(IntPtr txn, UInt32 dbi, ref ValueStructure key, IntPtr data);
int INativeLibraryFacade.mdb_cursor_get(IntPtr cursor, ref ValueStructure key, ref ValueStructure data, CursorOperation op) { return FallbackLibraryFacade.mdb_cursor_get(cursor, ref key, ref data, op); }
public static extern int mdb_cursor_get(IntPtr cursor, ref ValueStructure key, ref ValueStructure data, CursorOperation op);
private static extern int mdb_get(IntPtr txn, UInt32 dbi, ref ValueStructure key, out ValueStructure data);
public static extern int mdb_cursor_put(IntPtr cursor, ValueStructure key, ValueStructure data, PutOptions flags); //OK
private static extern int mdb_del(IntPtr txn, UInt32 dbi, ref ValueStructure key, IntPtr data);
public static extern int mdb_del(IntPtr txn, UInt32 dbi, ref ValueStructure key, ref ValueStructure data);
private int Compare(ref ValueStructure left, ref ValueStructure right) { return(_comparer.Compare(left.GetBytes(), right.GetBytes())); }
private bool Get(CursorOperation operation, byte[] key) { _currentValueStructure = default(ValueStructure); return(mdb_cursor_get(_handle, key, out _currentKeyStructure, out _currentValueStructure, operation) == 0); }
//TODO: tests private KeyValuePair<byte[], byte[]> Get(CursorOperation operation, ValueStructure? key = null, ValueStructure? value = null) { var keyStruct = key.GetValueOrDefault(); var valueStruct = value.GetValueOrDefault(); var res = Native.Read(lib => lib.mdb_cursor_get(_handle, ref keyStruct, ref valueStruct, operation)); return new KeyValuePair<byte[], byte[]>(keyStruct.ToByteArray(res), valueStruct.ToByteArray(res)); }
int INativeLibraryFacade.mdb_cursor_put(IntPtr cursor, ref ValueStructure key, ref ValueStructure data, PutOptions flags) { return Native64BitLibraryFacade.mdb_cursor_put(cursor, ref key, ref data, flags); }