Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
A Parser for SQLite Create Table Statements (github.com/marcobambini)
10 points by marcobambini on Jan 28, 2021 | hide | past | favorite | 2 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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: