Crate vapor_cli

Crate vapor_cli 

Source
Expand description

§Vapor-CLI

Vapor-CLI is a command-line interface for managing SQLite databases. It provides a set of commands to initialize databases, create tables, and interact with the data through a REPL or shell mode.

§Features

  • Database Initialization: Create a new SQLite database with the init command.
  • Table Management: Define and create tables with the create-table command.
  • Interactive REPL: An interactive Read-Eval-Print Loop (REPL) for executing SQL queries directly.
  • Shell Mode: A shell mode with database context for more advanced operations.
  • Data Population: A populate command to insert large amounts of data for testing purposes.

§Modules

The crate is organized into several modules, each responsible for a specific part of the functionality:

  • db: Core database operations like connecting, creating tables, and listing tables.
  • repl: Implements the interactive REPL mode.
  • shell: Implements the shell mode.
  • populate: Provides functionality for populating the database with test data.
  • bookmarks: Manages SQL query bookmarks.
  • config: Handles application configuration.
  • display: Manages the display of query results.
  • export: Handles data exporting.
  • transactions: Manages database transactions.

Re-exports§

pub use crate::repl::repl_mode;
pub use crate::shell::shell_mode;
pub use db::connect_database;
pub use db::create_table;
pub use db::init_database;
pub use db::list_tables;
pub use display::execute_sql;
pub use display::show_all_schemas;
pub use display::show_database_info;
pub use display::show_table_schema;
pub use display::OutputFormat;
pub use display::QueryOptions;
pub use export::export_to_csv;
pub use shell::Shell;
pub use bookmarks::Bookmark;
pub use bookmarks::BookmarkManager;
pub use transactions::TransactionManager;
pub use transactions::TransactionState;
pub use populate::populate_database;
pub use populate::ColumnConfig;
pub use populate::DataDistribution;
pub use populate::DataType;
pub use populate::PopulationConfig;

Modules§

bookmarks
SQL Query Bookmarking
config
Application Configuration Management
db
Database Management
display
Query Result Display and Formatting
export
Data Import and Export
populate
Database Population with Synthetic Data
repl
Interactive REPL Mode
shell
Interactive Shell Mode
transactions
Explicit Transaction Management

Structs§

Connection
A connection to a SQLite database.
VaporDB
A high-level API for interacting with SQLite databases through vapor-cli

Type Aliases§

Result
Result<T, Error>