SQL: what Basthon adds
This page describes what Basthon adds to SQL. To discover the kernel through examples, see SQL in Basthon.
The SQL kernel is SQLite (through sql.js): SQLite's whole syntax is available, and foreign key constraints are on.
Special commands
As in SQLite's command line tool, commands that start with a dot (dot commands) act on the database. .help lists them.
| Command | Role |
|---|---|
.help | shows the help |
.tables | lists the tables |
.schema | shows the CREATE statements of the database |
.export, .save or .backup | downloads the database in SQLite's binary format (.db) |
.dump | downloads the database as an SQL script |
Display of the results
The result of a query is shown as a table, that of the last query of the cell. A query that returns no row still shows the names of the columns.
Databases and scripts
The open button (or the module URL parameter) loads a database (*.db, *.sqlite), which is opened, or a script (*.sql), which is run (see Files and modules).