Skip to main content

Module harness

Module harness 

Source
Expand description

Shared command preamble helpers.

Every database-touching command opens with the same multi-db header (“Database: foo” when the config has multiple [databases.*] blocks). Concentrating that here removes the repeated five-line block from each command body — they call print_db_header and move on.

Functions§

print_db_header
Print the “Database: ” line when the config holds more than one database. No-op on single-database configs.