Hacker News new | ask | show | jobs
A Parser for SQLite Create Table Statements (github.com)
10 points by creolabs 1968 days ago
1 comments

It would be useful to know how this software extends the capabilities of the SQLite CLI. For example, see the dot commands for database introspection.

https://sqlite.org/cli.html#querying_the_database_schema

I'm not familiar with the library, but looking at the documentation, it looks like it provides a programmatic way to get information about the schema of a table just from the create statement, which seems useful if you want to do something programmatic with any SQLite database.

It does look like SQLite provides some PRAGMA commands that can do some of the same things, like:

  PRAGMA foreign_key_list(table-name);
  PRAGMA schema.index_xinfo(index-name);

https://www.sqlite.org/pragma.html