Reference¶
CLI Arguments¶
--profile¶
Connection profile name or path
--driver¶
Driver name
--uri¶
Database uniform resource identifier
--username¶
Database user username
--password¶
Database user password
--option¶
Driver-specific database option
--statement-option¶
Driver-specific statement option, applied to every statement executed
databow --driver postgresql --uri postgresql://crate@localhost:5432/crate --statement-option adbc.postgresql.use_copy=false
--mode¶
Table display style
| Mode | Description |
|---|---|
ascii-full |
ASCII table with all borders |
ascii-full-condensed |
ASCII table without row dividers |
ascii-borders-only |
ASCII table with outer borders only |
ascii-borders-only-condensed |
ASCII outer borders without row spacing |
ascii-horizontal-only |
ASCII with horizontal lines only |
ascii-markdown |
Markdown-compatible table format |
ascii-no-borders |
ASCII table without any borders |
utf8-compact |
Compact UTF-8 table style (default) |
utf8-full |
UTF-8 box drawing with all borders |
utf8-full-condensed |
UTF-8 box drawing without row dividers |
utf8-borders-only |
UTF-8 with outer borders only |
utf8-horizontal-only |
UTF-8 with horizontal lines only |
utf8-no-borders |
UTF-8 table without any borders |
nothing |
No borders or lines |
--query¶
Execute query and exit
--file¶
Read and execute file and exit
--output¶
Write result to file
The output format is inferred from the file extension:
| Extension | Format |
|---|---|
.json |
JSON |
.jsonl |
JSON lines |
.csv |
CSV |
.arrow, .ipc |
Arrow IPC file |
.arrows |
Arrow IPC stream |
.parquet |
Parquet |
--help¶
Print the help message
--version¶
Print the version
Dot Commands¶
The interactive shell accepts dot commands in addition to SQL. Dot commands start with ., take up a single line, and do not need a terminating semicolon.
.help¶
List the available dot commands
.last¶
Show the last result in full, without truncation
When the table is wide enough, the footer of a truncated result also includes the hint use .last to show entire result.
The previous result is discarded when the next query starts, so after a query fails there is no result to show.
.maxrows¶
Show or set the maximum number of rows to display
When a result has more rows than .maxrows, the first and last rows are shown with the rows in between elided, and a footer reports how many rows were shown. Rows are only elided when that shortens the output: three divider rows stand in for the elided rows, so a result with up to COUNT + 3 rows is shown in full. The default is 40 when writing to a terminal.
| Argument | Description |
|---|---|
| (none) | Show the current value |
COUNT |
Show COUNT rows of larger results (0 for no limit) |
default |
Restore the default |
Results of queries run with --query, --file, or stdin are never truncated.
.maxwidth¶
Show or set the maximum table width
When a result is wider than .maxwidth, long values are truncated with …; if that is not enough, columns in the middle of the result are hidden and replaced with a single … column. The default is the terminal width.
| Argument | Description |
|---|---|
| (none) | Show the current value |
WIDTH |
Limit tables to WIDTH characters (0 for no limit) |
default |
Restore the default |
Results of queries run with --query, --file, or stdin are never truncated, and long values wrap to fit the terminal instead.
.mode¶
Show or set the table display style
Accepts the same modes as --mode, and starts from the value given by --mode. Run .mode without an argument to show the current mode and list the available modes.
.pager¶
Show or configure paging of large results
| Argument | Description |
|---|---|
| (none) | Show the current pager settings |
automatic |
Use the pager when the result doesn't fit on the screen (default) |
on |
Always use the pager |
off |
Never use the pager |
set_row_threshold COUNT |
In automatic mode, use the pager when more than COUNT rows are shown (default: 50) |
COMMAND |
Set the pager command |
In automatic mode, the pager is used when more than 50 rows are shown or the result is wider than the terminal. Results that are truncated to fit the screen don't reach either threshold, so in practice the pager is used for .last and when the limits are raised with .maxrows or .maxwidth.
The pager command is taken from .pager COMMAND, then the DATABOW_PAGER and PAGER environment variables, and defaults to less -SRX (more on Windows). The -S option keeps long lines from wrapping so that wide tables can be scrolled horizontally. If the LESS environment variable is not set, databow sets it to SRX for the pager, so a plain less from PAGER behaves the same way. To use your own less options, set LESS or DATABOW_PAGER.
.quit¶
Exit databow (alias: .exit)