Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .schema command #339

Closed
tzzed opened this issue Jan 9, 2021 · 0 comments · Fixed by #374
Closed

Add .schema command #339

tzzed opened this issue Jan 9, 2021 · 0 comments · Fixed by #374
Labels
enhancement New feature or request
Milestone

Comments

@tzzed
Copy link
Contributor

tzzed commented Jan 9, 2021

Proposal

This is a proposal of .schema command to show the CREATE statements matching pattern.
The command shows all tables as default or shows the table name option.

Expected:

genji> .schema  [table_name]
CREATE TABLE foo (
    bar text NOT NULL,
   baz text NOT NULL
);

CREATE INDEX idx_foo_bar ON foo (bar);

CREATE TABLE bar (
    baz text NOT NULL,
);

Motivation

Like the .schema command of sqlite this is a good command to see the schema of all tables.

@tzzed tzzed added the enhancement New feature or request label Jan 9, 2021
@tzzed tzzed changed the title .schema command Add .schema command Jan 9, 2021
@asdine asdine added this to the v0.12.0 milestone Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants