@@ -6,7 +6,7 @@ use crate::{
66 PtrSync , PtrUnsync ,
77 cursor:: Cursor ,
88 r#impl:: Tx ,
9- iter:: { Iter , IterDupFixed , IterDupFixedOfKey } ,
9+ iter:: { Iter , IterDup , IterDupFixed , IterDupFixedOfKey , IterDupOfKey } ,
1010 } ,
1111} ;
1212use std:: { borrow:: Cow , sync:: Arc } ;
@@ -65,17 +65,41 @@ pub type RwCursorUnsync<'tx> = Cursor<'tx, Rw>;
6565pub type IterKeyVals < ' tx , ' cur , K , Key = Cow < ' tx , [ u8 ] > , Value = Cow < ' tx , [ u8 ] > > =
6666 Iter < ' tx , ' cur , K , Key , Value , { ffi:: MDBX_NEXT } > ;
6767
68- /// An iterator over the key/value pairs in an MDBX `DUPSORT` with duplicate
69- /// keys, yielding the first value for each key.
70- ///
71- /// See the [`Iter`] documentation for more details.
72- pub type IterDupKeys < ' tx , ' cur , K , Key = Cow < ' tx , [ u8 ] > , Value = Cow < ' tx , [ u8 ] > > =
73- Iter < ' tx , ' cur , K , Key , Value , { ffi:: MDBX_NEXT_NODUP } > ;
68+ // --- DUPSORT iterator aliases ---
7469
75- /// An iterator over the key/value pairs in an MDBX `DUPSORT`, yielding each
76- /// duplicate value for a specific key.
77- pub type IterDupVals < ' tx , ' cur , K , Key = Cow < ' tx , [ u8 ] > , Value = Cow < ' tx , [ u8 ] > > =
78- Iter < ' tx , ' cur , K , Key , Value , { ffi:: MDBX_NEXT_DUP } > ;
70+ /// A flat DUPSORT iterator for a synchronized read-only transaction.
71+ pub type RoDupIterSync < ' tx , ' cur , Key = Cow < ' tx , [ u8 ] > , Value = Cow < ' tx , [ u8 ] > > =
72+ IterDup < ' tx , ' cur , RoSync , Key , Value > ;
73+
74+ /// A flat DUPSORT iterator for a synchronized read-write transaction.
75+ pub type RwDupIterSync < ' tx , ' cur , Key = Cow < ' tx , [ u8 ] > , Value = Cow < ' tx , [ u8 ] > > =
76+ IterDup < ' tx , ' cur , RwSync , Key , Value > ;
77+
78+ /// A flat DUPSORT iterator for an unsynchronized read-only transaction.
79+ pub type RoDupIterUnsync < ' tx , ' cur , Key = Cow < ' tx , [ u8 ] > , Value = Cow < ' tx , [ u8 ] > > =
80+ IterDup < ' tx , ' cur , Ro , Key , Value > ;
81+
82+ /// A flat DUPSORT iterator for an unsynchronized read-write transaction.
83+ pub type RwDupIterUnsync < ' tx , ' cur , Key = Cow < ' tx , [ u8 ] > , Value = Cow < ' tx , [ u8 ] > > =
84+ IterDup < ' tx , ' cur , Rw , Key , Value > ;
85+
86+ /// A single-key DUPSORT iterator for a synchronized read-only transaction.
87+ pub type RoDupIterOfKeySync < ' tx , ' cur , Value = Cow < ' tx , [ u8 ] > > =
88+ IterDupOfKey < ' tx , ' cur , RoSync , Value > ;
89+
90+ /// A single-key DUPSORT iterator for a synchronized read-write transaction.
91+ pub type RwDupIterOfKeySync < ' tx , ' cur , Value = Cow < ' tx , [ u8 ] > > =
92+ IterDupOfKey < ' tx , ' cur , RwSync , Value > ;
93+
94+ /// A single-key DUPSORT iterator for an unsynchronized read-only transaction.
95+ pub type RoDupIterOfKeyUnsync < ' tx , ' cur , Value = Cow < ' tx , [ u8 ] > > =
96+ IterDupOfKey < ' tx , ' cur , Ro , Value > ;
97+
98+ /// A single-key DUPSORT iterator for an unsynchronized read-write transaction.
99+ pub type RwDupIterOfKeyUnsync < ' tx , ' cur , Value = Cow < ' tx , [ u8 ] > > =
100+ IterDupOfKey < ' tx , ' cur , Rw , Value > ;
101+
102+ // --- Transaction-level iterator aliases ---
79103
80104/// A key-value iterator for a synchronized read-only transaction.
81105pub type RoIterSync < ' tx , ' cur , Key = Cow < ' tx , [ u8 ] > , Value = Cow < ' tx , [ u8 ] > > =
@@ -94,33 +118,33 @@ pub type RwIterUnsync<'tx, 'cur, Key = Cow<'tx, [u8]>, Value = Cow<'tx, [u8]>> =
94118 IterKeyVals < ' tx , ' cur , Rw , Key , Value > ;
95119
96120/// A flattening DUPFIXED iterator for a synchronized read-only transaction.
97- pub type RoDupFixedIterSync < ' tx , ' cur , Key = Cow < ' tx , [ u8 ] > , const VALUE_SIZE : usize = 0 > =
98- IterDupFixed < ' tx , ' cur , RoSync , Key , VALUE_SIZE > ;
121+ pub type RoDupFixedIterSync < ' tx , ' cur , Key = Cow < ' tx , [ u8 ] > , Value = Cow < ' tx , [ u8 ] > > =
122+ IterDupFixed < ' tx , ' cur , RoSync , Key , Value > ;
99123
100124/// A flattening DUPFIXED iterator for a synchronized read-write transaction.
101- pub type RwDupFixedIterSync < ' tx , ' cur , Key = Cow < ' tx , [ u8 ] > , const VALUE_SIZE : usize = 0 > =
102- IterDupFixed < ' tx , ' cur , RwSync , Key , VALUE_SIZE > ;
125+ pub type RwDupFixedIterSync < ' tx , ' cur , Key = Cow < ' tx , [ u8 ] > , Value = Cow < ' tx , [ u8 ] > > =
126+ IterDupFixed < ' tx , ' cur , RwSync , Key , Value > ;
103127
104128/// A flattening DUPFIXED iterator for an unsynchronized read-only transaction.
105- pub type RoDupFixedIterUnsync < ' tx , ' cur , Key = Cow < ' tx , [ u8 ] > , const VALUE_SIZE : usize = 0 > =
106- IterDupFixed < ' tx , ' cur , Ro , Key , VALUE_SIZE > ;
129+ pub type RoDupFixedIterUnsync < ' tx , ' cur , Key = Cow < ' tx , [ u8 ] > , Value = Cow < ' tx , [ u8 ] > > =
130+ IterDupFixed < ' tx , ' cur , Ro , Key , Value > ;
107131
108132/// A flattening DUPFIXED iterator for an unsynchronized read-write transaction.
109- pub type RwDupFixedIterUnsync < ' tx , ' cur , Key = Cow < ' tx , [ u8 ] > , const VALUE_SIZE : usize = 0 > =
110- IterDupFixed < ' tx , ' cur , Rw , Key , VALUE_SIZE > ;
133+ pub type RwDupFixedIterUnsync < ' tx , ' cur , Key = Cow < ' tx , [ u8 ] > , Value = Cow < ' tx , [ u8 ] > > =
134+ IterDupFixed < ' tx , ' cur , Rw , Key , Value > ;
111135
112136/// A single-key DUPFIXED iterator for a synchronized read-only transaction.
113- pub type RoDupFixedIterOfKeySync < ' tx , ' cur , const VALUE_SIZE : usize = 0 > =
114- IterDupFixedOfKey < ' tx , ' cur , RoSync , VALUE_SIZE > ;
137+ pub type RoDupFixedIterOfKeySync < ' tx , ' cur , Value = Cow < ' tx , [ u8 ] > > =
138+ IterDupFixedOfKey < ' tx , ' cur , RoSync , Value > ;
115139
116140/// A single-key DUPFIXED iterator for a synchronized read-write transaction.
117- pub type RwDupFixedIterOfKeySync < ' tx , ' cur , const VALUE_SIZE : usize = 0 > =
118- IterDupFixedOfKey < ' tx , ' cur , RwSync , VALUE_SIZE > ;
141+ pub type RwDupFixedIterOfKeySync < ' tx , ' cur , Value = Cow < ' tx , [ u8 ] > > =
142+ IterDupFixedOfKey < ' tx , ' cur , RwSync , Value > ;
119143
120144/// A single-key DUPFIXED iterator for an unsynchronized read-only transaction.
121- pub type RoDupFixedIterOfKeyUnsync < ' tx , ' cur , const VALUE_SIZE : usize = 0 > =
122- IterDupFixedOfKey < ' tx , ' cur , Ro , VALUE_SIZE > ;
145+ pub type RoDupFixedIterOfKeyUnsync < ' tx , ' cur , Value = Cow < ' tx , [ u8 ] > > =
146+ IterDupFixedOfKey < ' tx , ' cur , Ro , Value > ;
123147
124148/// A single-key DUPFIXED iterator for an unsynchronized read-write transaction.
125- pub type RwDupFixedIterOfKeyUnsync < ' tx , ' cur , const VALUE_SIZE : usize = 0 > =
126- IterDupFixedOfKey < ' tx , ' cur , Rw , VALUE_SIZE > ;
149+ pub type RwDupFixedIterOfKeyUnsync < ' tx , ' cur , Value = Cow < ' tx , [ u8 ] > > =
150+ IterDupFixedOfKey < ' tx , ' cur , Rw , Value > ;
0 commit comments