@@ -142,10 +142,10 @@ impl TestSyncStore {
142
142
}
143
143
144
144
impl KVStore for TestSyncStore {
145
- fn read ( & self , namespace : & str , key : & str ) -> std:: io:: Result < Vec < u8 > > {
146
- let fs_res = self . fs_store . read ( namespace, key) ;
147
- let sqlite_res = self . sqlite_store . read ( namespace, key) ;
148
- let test_res = self . test_store . read ( namespace, key) ;
145
+ fn read ( & self , namespace : & str , sub_namespace : & str , key : & str ) -> std:: io:: Result < Vec < u8 > > {
146
+ let fs_res = self . fs_store . read ( namespace, sub_namespace , key) ;
147
+ let sqlite_res = self . sqlite_store . read ( namespace, sub_namespace , key) ;
148
+ let test_res = self . test_store . read ( namespace, sub_namespace , key) ;
149
149
150
150
match fs_res {
151
151
Ok ( read) => {
@@ -163,12 +163,12 @@ impl KVStore for TestSyncStore {
163
163
}
164
164
}
165
165
166
- fn write ( & self , namespace : & str , key : & str , buf : & [ u8 ] ) -> std:: io:: Result < ( ) > {
167
- let fs_res = self . fs_store . write ( namespace, key, buf) ;
168
- let sqlite_res = self . sqlite_store . write ( namespace, key, buf) ;
169
- let test_res = self . test_store . write ( namespace, key, buf) ;
166
+ fn write ( & self , namespace : & str , sub_namespace : & str , key : & str , buf : & [ u8 ] ) -> std:: io:: Result < ( ) > {
167
+ let fs_res = self . fs_store . write ( namespace, sub_namespace , key, buf) ;
168
+ let sqlite_res = self . sqlite_store . write ( namespace, sub_namespace , key, buf) ;
169
+ let test_res = self . test_store . write ( namespace, sub_namespace , key, buf) ;
170
170
171
- assert ! ( self . list( namespace) . unwrap( ) . contains( & key. to_string( ) ) ) ;
171
+ assert ! ( self . list( namespace, sub_namespace ) . unwrap( ) . contains( & key. to_string( ) ) ) ;
172
172
173
173
match fs_res {
174
174
Ok ( ( ) ) => {
@@ -184,12 +184,12 @@ impl KVStore for TestSyncStore {
184
184
}
185
185
}
186
186
187
- fn remove ( & self , namespace : & str , key : & str ) -> std:: io:: Result < ( ) > {
188
- let fs_res = self . fs_store . remove ( namespace, key) ;
189
- let sqlite_res = self . sqlite_store . remove ( namespace, key) ;
190
- let test_res = self . test_store . remove ( namespace, key) ;
187
+ fn remove ( & self , namespace : & str , sub_namespace : & str , key : & str , lazy : bool ) -> std:: io:: Result < ( ) > {
188
+ let fs_res = self . fs_store . remove ( namespace, sub_namespace , key, lazy ) ;
189
+ let sqlite_res = self . sqlite_store . remove ( namespace, sub_namespace , key, lazy ) ;
190
+ let test_res = self . test_store . remove ( namespace, sub_namespace , key, lazy ) ;
191
191
192
- assert ! ( !self . list( namespace) . unwrap( ) . contains( & key. to_string( ) ) ) ;
192
+ assert ! ( !self . list( namespace, sub_namespace ) . unwrap( ) . contains( & key. to_string( ) ) ) ;
193
193
194
194
match fs_res {
195
195
Ok ( ( ) ) => {
@@ -205,10 +205,10 @@ impl KVStore for TestSyncStore {
205
205
}
206
206
}
207
207
208
- fn list ( & self , namespace : & str ) -> std:: io:: Result < Vec < String > > {
209
- let fs_res = self . fs_store . list ( namespace) ;
210
- let sqlite_res = self . sqlite_store . list ( namespace) ;
211
- let test_res = self . test_store . list ( namespace) ;
208
+ fn list ( & self , namespace : & str , sub_namespace : & str ) -> std:: io:: Result < Vec < String > > {
209
+ let fs_res = self . fs_store . list ( namespace, sub_namespace ) ;
210
+ let sqlite_res = self . sqlite_store . list ( namespace, sub_namespace ) ;
211
+ let test_res = self . test_store . list ( namespace, sub_namespace ) ;
212
212
213
213
match fs_res {
214
214
Ok ( mut list) => {
0 commit comments