Ejemplo n.º 1
0
 private int IsDuplicate(ref ValueStructure left, ref ValueStructure right)
 {
     return(_duplicatesComparer.Compare(left.GetBytes(), right.GetBytes()));
 }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 7
0
 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);
 }
Ejemplo n.º 9
0
 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));
 }
Ejemplo n.º 10
0
 int INativeLibraryFacade.mdb_cursor_put(IntPtr cursor, ValueStructure key, ValueStructure data, PutOptions flags)
 {
     return(FallbackLibraryFacade.mdb_cursor_put(cursor, key, data, flags));
 }
Ejemplo n.º 11
0
 int INativeLibraryFacade.mdb_del(IntPtr txn, uint dbi, ref ValueStructure key, IntPtr data)
 {
     return(FallbackLibraryFacade.mdb_del(txn, dbi, ref key, data));
 }
Ejemplo n.º 12
0
 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));
 }
Ejemplo n.º 13
0
 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);
 }
Ejemplo n.º 15
0
 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);
Ejemplo n.º 17
0
 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);
 }
Ejemplo n.º 19
0
 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);
 }
Ejemplo n.º 21
0
 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);
Ejemplo n.º 23
0
 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);
Ejemplo n.º 25
0
 public static extern int mdb_del(IntPtr txn, UInt32 dbi, ref ValueStructure key, ref ValueStructure data);
Ejemplo n.º 26
0
 private int Compare(ref ValueStructure left, ref ValueStructure right)
 {
     return(_comparer.Compare(left.GetBytes(), right.GetBytes()));
 }
Ejemplo n.º 27
0
 private bool Get(CursorOperation operation, byte[] key)
 {
     _currentValueStructure = default(ValueStructure);
     return(mdb_cursor_get(_handle, key, out _currentKeyStructure, out _currentValueStructure, operation) == 0);
 }
Ejemplo n.º 28
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));
        }
Ejemplo n.º 29
0
 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);
 }