Skip to main content

Crate narwhal_commands

Crate narwhal_commands 

Source
Expand description

Stateless command and helper modules for narwhal.

Each module here is a self-contained piece of the host application that does not own runtime state: completion engine, export pipeline, connection wizard, snippet store, DDL/EXPLAIN helpers, inline cell editing, statement extraction and the :-prompt command dispatch.

Hosts (narwhal-app, the headless CLI, the MCP server) call into these modules with the data they own; nothing here reaches back into the host.

Modules§

action
Application-level actions decoupled from raw key events.
cell_edit
Inline cell edit support: parsing user input into a Value and generating an UPDATE statement for the originating row.
commands
completion
SQL completion provider.
ddl
DDL (CREATE TABLE / CREATE INDEX) generation from a TableSchema.
explain
Parse and render PostgreSQL EXPLAIN (ANALYZE, FORMAT JSON) output.
export
Tabular result export pipelines.
keymap
Key chord representation, parsing, and the Keymap resolver.
meta
Background metadata operations channel.
pending
Pending mutations: row-level changes the user has staged but not yet committed to the database.
pre_connect
Pre-connect command runner (L36 #7).
schema_diff
Per-table schema diff and ALTER TABLE generation.
session
snippets
Snippet store — persisted named queries.
statements
SQL statement extraction over an editor buffer.
template
Built-in SQL templates (v1.3 #10).
wizard
Interactive :add connection wizard.