@@ -13,7 +13,7 @@ The process of constructing a blob object, its internal is the process of initia
1313| blob | blob initial object |
1414| value_buf | Buffer for storing data |
1515| buf_len | The size of the buffer |
16- | Back | The blob object after creation |
16+ | Return | The blob object after creation |
1717
1818### Read blob data
1919
@@ -40,7 +40,7 @@ Through the API of KVDB and TSDB, the blob object can be returned, and the stora
4040| path | FAL mode: the partition name in the partition table, file mode: the path where the database is saved |
4141| default_kv | The default KV collection, when the first initialization, the default KV will be written to the database |
4242| user_data | User-defined data, NULL if not available |
43- | Back | Error Code |
43+ | Return | Error Code |
4444
4545### Control KVDB
4646
@@ -53,7 +53,7 @@ Through the command control word, the user can perform some control operations o
5353| db | Database Objects |
5454| cmd | Command control word |
5555| arg | Controlled parameters |
56- | Back | Error Code |
56+ | Return | Error Code |
5757
5858The supported command control words are as follows:
5959
@@ -102,7 +102,7 @@ Get the corresponding value by KV's name. Support two interfaces
102102| db | Database Objects |
103103| key | KV name |
104104| blob | blob object, as the value of KV |
105- | Back | Error Code |
105+ | Return | Error Code |
106106
107107Example:
108108
@@ -122,7 +122,7 @@ fdb_kv_set_blob(kvdb, "temp", fdb_blob_make(&blob, &temp_data, sizeof(temp_data)
122122| db | Database Objects |
123123| key | KV name |
124124| value | KV value |
125- | Back | Error Code |
125+ | Return | Error Code |
126126
127127### Get KV
128128
@@ -135,7 +135,7 @@ fdb_kv_set_blob(kvdb, "temp", fdb_blob_make(&blob, &temp_data, sizeof(temp_data)
135135| db | Database Objects |
136136| key | KV name |
137137| blob | Return the blob value of KV through the blob object |
138- | Back | Error Code |
138+ | Return | Error Code |
139139
140140Example:
141141
@@ -161,7 +161,7 @@ Unlike the `fdb_kv_get_blob` API, this API does not execute the reading of value
161161| db | Database Objects |
162162| key | KV name |
163163| kv | Through the KV object, return the attributes of the KV, and then use `fdb_kv_to_blob` to convert to a blob object, and then read the data |
164- | Back | Error Code |
164+ | Return | Error Code |
165165
166166#### Get string type KV
167167
@@ -188,7 +188,7 @@ Unlike the `fdb_kv_get_blob` API, this API does not execute the reading of value
188188| ---- | ---------- |
189189| db | Database Objects |
190190| key | KV name |
191- | Back | Error Code |
191+ | Return | Error Code |
192192
193193### Reset KVDB
194194
@@ -199,7 +199,7 @@ Reset the KV in KVDB to the **first initial** default value
199199| Parameters | Description |
200200| ---- | ---------- |
201201| db | Database Objects |
202- | Back | Error Code |
202+ | Return | Error Code |
203203
204204### Print KV information in KVDB
205205
@@ -208,7 +208,7 @@ Reset the KV in KVDB to the **first initial** default value
208208| Parameters | Description |
209209| ---- | ---------- |
210210| db | Database Objects |
211- | Back | Error Code |
211+ | Return | Error Code |
212212
213213### Convert KV objects to blob objects
214214
@@ -221,10 +221,11 @@ Reset the KV in KVDB to the **first initial** default value
221221| Return | Converted blob object |
222222
223223### Initialize KV iterator
224- `fdb_kv_iterator_t fdb_kv_iterator_init(fdb_kv_iterator_t itr)`
224+ `fdb_kv_iterator_t fdb_kv_iterator_init(fdb_kvdb_t db, fdb_kv_iterator_t itr)`
225225
226226| Parameters | Description |
227227| ---- | -------------------- |
228+ | db | Database Objects |
228229| itr | Iterator object to be initialized |
229230| Return | Iterator object after initialization |
230231
@@ -252,7 +253,7 @@ Using this iterator API, all KVs in the entire KVDB can be traversed.
252253| get_time | Function to get the current timestamp |
253254| max_len | Maximum length of each TSL |
254255| user_data | User-defined data, NULL if not available |
255- | Back | Error Code |
256+ | Return | Error Code |
256257
257258### Control TSDB
258259
@@ -265,7 +266,7 @@ Through the command control word, the user can perform some control operations o
265266| db | Database Objects |
266267| cmd | Command control word |
267268| arg | Controlled parameters |
268- | Back | Error Code |
269+ | Return | Error Code |
269270
270271The supported command control words are as follows:
271272
@@ -300,7 +301,7 @@ For TSDB, the process of adding TSL is the process of appending a new TSL to the
300301| ---- | --------------------------- |
301302| db | Database Objects |
302303| blob | blob object, as TSL data |
303- | Back | Error Code |
304+ | Return | Error Code |
304305
305306### Iterative TSL
306307
@@ -313,7 +314,20 @@ Traverse the entire TSDB and execute iterative callbacks
313314| db | Database Objects |
314315| cb | Callback function, which will be executed every time the TSL is traversed |
315316| cb_arg | Parameters of the callback function |
316- | Back | Error Code |
317+ | Return | Error Code |
318+
319+ ### Reverse iterative TSL
320+
321+ Reverse traverse the entire TSDB and execute iterative callbacks
322+
323+ ` void fdb_tsl_iter_reverse(fdb_tsdb_t db, fdb_tsl_cb cb, void *arg) `
324+
325+ | Parameters | Description |
326+ | ---------- | ------------------------------------------------------------ |
327+ | db | Database Objects |
328+ | cb | Callback function, which will be executed every time the TSL is traversed |
329+ | cb_arg | Parameters of the callback function |
330+ | Return | Error Code |
317331
318332### Iterate TSL by time period
319333
@@ -324,11 +338,11 @@ According to the time range, traverse the entire TSDB and execute iterative call
324338| Parameters | Description |
325339| ------ | --------------------------------------- |
326340| db | Database Objects |
327- | from | Start timestamp |
341+ | from | Start timestamp. It will be a reverse iterator when ending timestamp less than starting timestamp |
328342| to | End timestamp |
329343| cb | Callback function, which will be executed every time the TSL is traversed |
330344| cb_arg | Parameters of the callback function |
331- | Back | Error Code |
345+ | Return | Error Code |
332346
333347### Query the number of TSL
334348
@@ -341,7 +355,7 @@ According to the incoming time period, query the number of TSLs that meet the st
341355| from | Start timestamp |
342356| to | End timestamp |
343357| status | TSL status conditions |
344- | Back | Quantity |
358+ | Return | Quantity |
345359
346360### Set TSL status
347361
@@ -354,7 +368,7 @@ For TSL status, please refer to `enum fdb_tsl_status`. TSL status MUST be set in
354368| db | Database Objects |
355369| tsl | TSL Object |
356370| status | TSL's new status |
357- | Back | Error Code |
371+ | Return | Error Code |
358372
359373### Clear TSDB
360374
@@ -363,7 +377,7 @@ For TSL status, please refer to `enum fdb_tsl_status`. TSL status MUST be set in
363377| Parameters | Description |
364378| ---- | ---------- |
365379| db | Database Objects |
366- | Back | Error Code |
380+ | Return | Error Code |
367381
368382### Convert TSL objects to blob objects
369383
0 commit comments