Rate This Document
Findability
Accuracy
Completeness
Readability

Commands Supported by ldb

Table 1 Commands Supported by ldb

Command

Description

put <key> <value> [--ttl]

Writes data to a database.

get <key> [--ttl]

Reads values of specified keys from memtable in the memory or SST files in the drive.

batchput <key> <value> [<key> <value>] [..] [--ttl]

Writes data to the database in batches.

scan [--from] [--to] [--ttl] [--timestamp] [--max_keys=<N>q] [--start_time=<N>:- is inclusive] [--end_time=<N>:- is exclusive] [--no_value]

Scans data in a database. You can also add conditions to specify the range of data to be scanned, such as the key range and lifecycle.

delete <key>

Deletes data of a specified key.

deleterange <begin key> <end key>

Deletes all key-value pairs in a specified range.

query [--ttl]

Runs the query command. An EEPL shell starts. A list of available commands is displayed after you input help. Then you can run the commands as required.

approxsize [--from] [--to]

Queries the drive space occupied by the data. The key value range specifies the data to be queried.

checkconsistency

Checks whether the file system contains all files in the lifecycle and whether their file sizes match the memory records.

list_file_range_deletes [--max_keys=<N>]

Displays the maximum value of the range to be deleted in an SST file.