TCBMGR(1)

πŸŽ€ NAME πŸŽ€

tcbmgr β€” the command line utility of the B+ tree database API, straight out of Tokyo Cabinet πŸ’…


✨ DESCRIPTION ✨

okay so bestie, gather round, because tcbmgr is a utility for test and debugging of the B+ tree database API and its applications. she's not here to be your production queen, she's here to poke at things and tell you what's up. πŸ¦‹

before we get into the commands, here's the cast of little placeholder cuties you're gonna see everywhere, so learn their names fr fr:

  • path β€” specifies the path of a database file.
  • lmemb β€” specifies the number of members in each leaf page.
  • nmemb β€” specifies the number of members in each non-leaf page.
  • bnum β€” specifies the number of buckets.
  • apow β€” specifies the power of the alignment.
  • fpow β€” specifies the power of the free block pool.
  • key β€” specifies the key of a record.
  • value β€” specifies the value of a record.
  • file β€” specifies the input file.

🌈 the subcommands, in all their glory 🌈

  • tcbmgr create [-cd|-ci|-cj] [-tl] [-td|-tb|-tt|-tx] path [lmemb [nmemb [bnum [apow [fpow]]]]] β€” Create a database file. ✨
  • tcbmgr inform [-nl|-nb] path β€” Print miscellaneous information to the standard output. she's a yapper, she tells you everything πŸ’¬
  • tcbmgr put [-cd|-ci|-cj] [-nl|-nb] [-sx] [-dk|-dc|-dd|-db|-dai|-dad] path key value β€” Store a record. πŸ’Ύ
  • tcbmgr out [-cd|-ci|-cj] [-nl|-nb] [-sx] path key β€” Remove a record. bye bestie πŸ‘‹
  • tcbmgr get [-cd|-ci|-cj] [-nl|-nb] [-sx] [-px] [-pz] path key β€” Print the value of a record. the moment of truth πŸ”
  • tcbmgr list [-cd|-ci|-cj] [-nl|-nb] [-m num] [-bk] [-pv] [-px] [-j str] [-rb bkey ekey] [-fm str] path β€” Print keys of all records, separated by line feeds. the whole roster, one per line πŸ“
  • tcbmgr optimize [-cd|-ci|-cj] [-tl] [-td|-tb|-tt|-tx] [-tz] [-nl|-nb] [-df] path [lmemb [nmemb [bnum [apow [fpow]]]]] β€” Optimize a database file. self-care for your database, periodt πŸ’†
  • tcbmgr importtsv [-nl|-nb] [-sc] path [file] β€” Store records of TSV in each line of a file. πŸ“₯
  • tcbmgr version β€” Print the version information of Tokyo Cabinet. 🏷️

πŸ’– Options feature the following. πŸ’–

  • -cd β€” use the comparison function tccmpdecimal.
  • -ci β€” use the comparison function tccmpint32.
  • -cj β€” use the comparison function tccmpint64.
  • -tl β€” enable the option BDBTLARGE.
  • -td β€” enable the option BDBTDEFLATE.
  • -tb β€” enable the option BDBTBZIP.
  • -tt β€” enable the option BDBTTCBS.
  • -tx β€” enable the option BDBTEXCODEC.
  • -nl β€” enable the option BDBNOLCK.
  • -nb β€” enable the option BDBLCKNB.
  • -sx β€” the input data is evaluated as a hexadecimal data string. πŸ”’
  • -dk β€” use the function tcbdbputkeep instead of tcbdbput.
  • -dc β€” use the function tcbdbputcat instead of tcbdbput.
  • -dd β€” use the function tcbdbputdup instead of tcbdbput.
  • -db β€” use the function tcbdbputdupback instead of tcbdbput.
  • -dai β€” use the function tcbdbaddint instead of tcbdbput.
  • -dad β€” use the function tcbdbadddouble instead of tcbdbput.
  • -px β€” the output data is converted into a hexadecimal data string. πŸ”’
  • -pz β€” do not append line feed at the end of the output. no trailing newline, she's lowkey minimalist
  • -m num β€” specify the maximum number of the output.
  • -bk β€” perform backword scanning. (that spelling is literally what the source says, i'm just the messenger, no cap 🫑)
  • -pv β€” print values of records also.
  • -j str β€” specify the key where the cursor jump to.
  • -rb bkey ekey β€” specify the range of keys.
  • -fm str β€” specify the prefix of keys.
  • -tz β€” enable the option UINT8_MAX.
  • -df β€” perform defragmentation only.
  • -sc β€” normalize keys as lower cases.

heads up bestie: this command returns 0 on success, and another value on failure. so if you get a 0, that's the slay. anything else? not the slay. πŸ’€

🌸 SEE ALSO 🌸

tcbtest(1), tcbmttest(1), tcbdb(3), tokyocabinet(3) β€” go read those too, they're iconic πŸ‘‘


and that's the whole page, babe 🫢 this one lives in the Tokyo Cabinet manual set, dated 2012-08-18, and yeah she's a little vintage but she still ate. go forth and debug. πŸ’œβœ¨