Skip to main content

Crate rudb_cli

Crate rudb_cli 

Source
Expand description

The command line shell.

Rank 15 in the layer rule. See xtask/layers.toml and spec/18-package-layout.md.

The binary is a few lines over this, so that the shell can be driven from a test without spawning a process and so that rudb-compat can drive it as a target the same way it drives the library. Everything the shell does goes through rudb::Database, which means the shell has no way to reach anything the embedding API cannot, which is the point: if the prompt can do it, a program can do it.

The command line and the dot commands are DuckDB’s, down to the single dash long options it inherits from SQLite. The output modes are DuckDB’s too, byte for byte, because the reason anybody pipes a shell into another program is that they already know what comes out.

Re-exports§

pub use args::Action;
pub use args::Command;
pub use args::Options;
pub use args::parse;
pub use format::Format;
pub use format::Settings;
pub use shell::Shell;
pub use shell::Stop;

Modules§

args
The command line, in DuckDB’s spelling.
format
The output modes.
help
The text the shell prints about itself.
shell
The shell itself: read a line, decide whether it is SQL or a dot command, run it, print it.

Constants§

VERSION
The version, which -version prints and which the greeting carries.

Functions§

run
The whole program, minus the process it runs in.