1pub const MODES: &str = "ascii, box, column, csv, duckbox, html, insert, json, jsonlines, line, list, markdown, quote, table, tabs, trash";
8
9pub const USAGE: &str = "\
11Usage: rudb [OPTIONS] [FILENAME [SQL...]]
12
13An embedded analytical database, compatible with DuckDB.
14
15FILENAME is the database to open. Only :memory: works today, because there is no storage format
16yet. A second argument is SQL to run, after which the shell exits.
17
18Options:
19 -bail stop after the first error
20 -batch read input as a script even when it is a terminal
21 -c, -s SQL run SQL and exit
22 -cmd SQL run SQL before reading input, and keep reading
23 -echo print each statement before running it
24 -f, -file FILENAME run a file of SQL and exit
25 -header, -noheader turn column names on or off
26 -init FILENAME run a file of SQL before reading input
27 -interactive show a prompt even when input is not a terminal
28 -newline SEP what goes between rows in the separated modes
29 -nullvalue TEXT what a null prints as
30 -readonly open without allowing writes
31 -separator SEP what goes between values in the separated modes
32 -version print the version and exit
33 --print-config print the build configuration and exit
34 -h, -help print this and exit
35
36Most modes can also be given as an option: -ascii, -box, -column, -csv, -html, -json, -jsonlines,
37-line, -list, -markdown, -quote and -table. They set the mode and they do not all set the
38separators that .mode sets, which is what DuckDB does.
39";
40
41pub const DOT_COMMANDS: &str = "\
43.bail on|off stop after the first error
44.databases list the attached databases
45.echo on|off print each statement before running it
46.exit exit the shell
47.headers on|off turn column names on or off
48.help print this
49.mode MODE ?TABLE? set the output mode
50.nullvalue TEXT set what a null prints as
51.open FILENAME close the current database and open another
52.output ?FILENAME? send output to a file, or back to stdout
53.print TEXT... print the text
54.quit exit the shell
55.read FILENAME run a file of SQL
56.schema ?PATTERN? show the CREATE TABLE for the tables
57.separator COL ?ROW? set the separators used in the separated modes
58.show show the current settings
59.tables ?PATTERN? list the tables
60.timer on|off print how long each statement took
61";