tkrzw_dbm_util - Man Page

manual page for tkrzw_dbm_util 1.0.21

Description

tkrzw_dbm_util: DBM utilities of Tkrzw

Usage

tkrzw_dbm_util create [common_options] [tuning_options] [options] file

: Creates a database file.

tkrzw_dbm_util inspect [common_options] file [attr]

: Prints inspection of a database file.

tkrzw_dbm_util get [common_options] file key

: Gets a record and prints it.

tkrzw_dbm_util set [common_options] [options] file key

: Sets a record.

tkrzw_dbm_util remove [common_options] file key

: Removes a record.

tkrzw_dbm_util rekey [common_options] file old_key new_key

: Changes the key of a record.

tkrzw_dbm_util list [common_options] file

: Lists up records and prints them.

tkrzw_dbm_util rebuild [common_options] [tuning_options] file

: Rebuilds a database file for optimization.

tkrzw_dbm_util restore [common_options] old_file [new_file]

: Restores a broken database file.

tkrzw_dbm_util merge [common_options] dest_file src_files...

: Merges database files.

tkrzw_dbm_util export [common_options] [options] dbm_file rec_file

: Exports records to a flat record file.

tkrzw_dbm_util import [common_options] [options] dbm_file rec_file

: Imports records from a flat record file.

Common options

--dbm impl : The name of a DBM implementation: auto, hash, tree, skip, tiny, baby, cache, stdhash, stdtree, poly, shard. (default: auto)

--file impl : The name of a file implementation: mmap-para, mmap-atom, pos-para, pos-atom. (default: mmap-para)

--no_wait : Fails if the file is locked by another process.

--no_lock : Omits file locking.

--sync_hard : Synchronizes the file physically when closing.

--alloc_init num : The initial allocation size. (default: 1048576)

--alloc_inc num : The allocation increment factor. (default: 2.0)

--block_size num : The block size of the positional access file. (default: 1)

--direct_io : Enables the direct I/O option of the positional access file.

--sync_io : Enables the synchronous I/O option of the positional access file.

--padding : Enables padding at the end of the file.

--pagecache : Enables the mini page cache in the process.

--multi : Calls xxxMulti methods for get, set, and remove subcommands.

Options for the create subcommand

--truncate : Truncates an existing database file.

Options for the inspect subcommand

--validate : Validates records.

Options for the set subcommand

--no_overwrite : Fails if there's an existing record with the same key.

--append str : Appends the value at the end after the given delimiter.

--incr num : Increments the value with the given initial value.

--reducer func : Sets the reducer for the skip database: none, first, second, last, concat, concatnull, concattab, concatline, total. (default: none)

Options for the rekey subcommand

--no_overwrite : Fails if there's an existing record with the same key.

Options for the list subcommand

--move type : Type of movement: first, jump, jumplower, jumplowerinc, jumpupper, jumpupperinc. (default: first)

--jump_key str : Specifies the jump key. (default: empty string)

--items num : The number of items to print. (default: 10)

--escape : C-style escape is applied to the TSV data.

--keys : Prints keys only.

Options for the rebuild subcommand

--restore : Skips broken records to restore a broken database.

Options for the restore subcommand

--auto str : The restore mode automatically done: none, default, default-ns, sync, sync-ns. (default: none)

--end_offset : The exclusive end offset of records to read. (default: -1)

--class : The class name given to PolyDBM or ShardDBM.

Options for the merge subcommand

--reducer func : Sets the reducer for the skip database: none, first, second, last, concat, concatnull, concattab, concatline, total. (default: none)

Options for the export and import subcommands

--tsv : The record file is in TSV format instead of flat record.

--escape : C-style escape/unescape is applied to the TSV data.

--keys : Exports keys only.

--ulog num : Uses update logs based on the timestamp.

--ulog_ids num num : Sets the server ID and the DBM index of update logs.

Tuning options for HashDBM

--in_place : Uses in-place rather than pre-defined ones.

--append : Uses appending rather than pre-defined ones.

--record_crc num : The record CRC mode: -1, 0, 8, 16, 32. (default: 0 or -1)

--record_comp str : The record compression mode: default, none, zlib, zstd, lz4, lzma. (default: none or default)

--offset_width num : The width to represent the offset of records. (default: 4 or -1)

--align_pow num : Sets the power to align records. (default: 3 or -1)

--buckets num : Sets the number of buckets for hashing. (default: 1048583 or -1)

Tuning options for TreeDBM

--in_place : Uses in-place rather than pre-defined ones.

--append : Uses appending rather than pre-defined ones.

--record_crc num : The record CRC mode: -1, 0, 8, 16, 32. (default: 0 or -1)

--record_comp str : The record compression mode: default, none, zlib, zstd, lz4, lzma. (default: none or default)

--offset_width num : The width to represent the offset of records. (default: 4 or -1)

--align_pow num : Sets the power to align records. (default: 10 or -1)

--buckets num : Sets the number of buckets for hashing. (default: 131101 or -1)

--max_page_size num : Sets the maximum size of a page. (default: 8130 or -1)

--max_branches num : Sets the maximum number of branches of inner nodes. (default: 256 or -1)

--comparator func : Sets the key comparator: lex, lexcase, dec, hex. (default: lex)

Tuning options for SkipDBM

--offset_width num : The width to represent the offset of records. (default: 4)

--step_unit num : Sets the step unit of the skip list. (default: 4)

--max_level num : Sets the maximum level of the skip list. (default: 14)

--sort_mem_size num : Sets the memory size used for sorting. (default: 268435456)

--insert_in_order : Inserts records in ascending order of the key.

Options for PolyDBM and ShardDBM

--params str : Sets the parameters in "key=value,key=value" format.

Info

November 2021 tkrzw_dbm_util 1.0.21