BashDB help ---------- db_verify ---------- Verify that a database file is good to use REQUIRED: -f The path to a database file ---------- db_set ---------- Get a value (or a provided default) from a table REQUIRED: -f The path to a database file -k Which key to modify OPTIONS: -c Which column to modify If this is not specified, the default unnamed column is used -i When dealing with list values, specify an index at which to insert the values Only makes sense in conjunction with "-m add" Without -i, added values will be appended to the end of the list This can also be used to reorder one or more items in the list Indexes start from 0 for the first item -I Read value (text or binary) from standard input (pipe) Can not be combined with -v -v The value to set. Can be specified multiple times -m Specifies that the provided values should be added or removed from any existing ones ---------- db_get ---------- Set or unset (set to empty) a value in the table REQUIRED: -f The path to a database file -k Which key to get OPTIONS: -c Which column to get If this is not specified, the default unnamed column is used -d A default value to display if the requested one is unset -0 Append a null byte (\0) to the output, even if the value is not a list -h Append a newline to the output -i When dealing with list values, get a single item from the list Indexes start from 0 for the first item ---------- db_dump ---------- Display a table to a user, with UTF-8 character table lines. REQUIRED: -f The path to a database file OPTIONS: -r Raw dump, displays the raw database data for the requested rows -R Raw dump without the column header (data only) -k Specify keys to dump. Can be specified multiple times -F Dump the database in a specific format Formats: Table, CSV -c Filter display columns Can be specified multiple times ---------- db_keys ---------- Show a list of the keys currently stored in the table REQUIRED: -f The path to a database file OPTIONS: -h Human readable output. Replaces the default null byte (\0) separator with a newline -n Print the next free numeric key, starting at 1 -r Only keys matching this regex will be returned ---------- db_columns ---------- Show a list of the columns currently stored in the table REQUIRED: -f The path to a database file OPTIONS: -h Human readable output. Replaces the default null byte (\0) separator with a newline ---------- db_copy_row ---------- Copies a single row with a provided key to a target row, optionally overwriting it if it exists REQUIRED: -f The path to a database file -k The source key -t The target key OPTIONS: -o Overwrite existing target key Copying to an existing target without -o will print an error message and return 1 ---------- db_rename ---------- Renames a single row with a provided key to a target key, optionally overwriting it if it exists REQUIRED: -f The path to a database file -k The source key -t The target key OPTIONS: -o Overwrite existing target key Renaming to an existing target without -o will print an error message and return 1 ---------- db_rename_column ---------- Renames a single column to a new name, optionally overwriting it if it exists Please think twice before overwriting your columns. This has the ability to permanently remove a bunch of data. REQUIRED: -f The path to a database file -s The source column -t The target column OPTIONS: -o Overwrite existing target column Renaming to an existing target without -o will print an error message and return 1 ---------- db_has_key ---------- Returns 0 if a given key exists, 1 if it does not REQUIRED: -f The path to a database file -k The key ---------- db_has_column ---------- Returns 0 if a given column exists, 1 if it does not REQUIRED: -f The path to a database file OPTIONS: -c The column If none is specified, we will look for the default column ---------- db_search ---------- Searches for keys where a given column matches a regular expression REQUIRED: -f The path to a database file -r The regular expression used to match values OPTIONS: -d Dump the results using db_dump instead of listing keys -h Human readable output. Replaces the default null byte (\0) key separator with a newline -c The column to search in The default column is used if this is not provided ---------- db_delete ---------- Delete a row from the table REQUIRED: -f The path to a database file -k The key to delete ---------- db_delete_column ---------- Delete a column from all rows in a table REQUIRED: -f The path to a database file OPTIONS: -c The column to delete If none is specified, we will look for the default column ---------- db_trim ---------- Trim a table, removing all columns that are unset in all rows There's normally no reason to do this, as empty columns aren't a substantial performance issue, and you might want to use them again later. REQUIRED: -f The path to a database file ---------- db_testdb ---------- Generate a simple test database with some values to play around with Dumps the table after creating it REQUIRED: -f Path to a non-existing table that will be created and filled with test data ---------- db_selftest ---------- Run unit tests No options, yet.