Query datasette.io
Run SQL against data in Datasette.
- Name For Model
- datasette_datasette_io_3c330f
- Website
- datasette.io
- Try on ChatGPT
- Open ChatGPT and Search the plugin name
- Update Date
- 6 months ago
- Contact
- [email protected]
- Description For Model
- Run SQLite queries against a database hosted by Datasette. Datasette supports most SQLite syntax but does not support PRAGMA statements. Use `select group_concat(sql, ';') from sqlite_master` to see the list of tables and their columns Use `select sql from sqlite_master where name = 'table_name'` to see the schema for a table, including its columns. Instead of `PRAGMA table_info(table_name)` use `select * from pragma_table_info('table_name')` PRAGMA statements are not allowed. `select * from pragma_table_info('table_name') is allowed.
Plugin Functions/Features (Plugin API Document)
Operation Id | HTTP Method | Description | |
---|---|---|---|
1 | query | GET | Accepts SQLite SQL query, returns JSON. Does not allow PRAGMA statements. |
FAQs
What is Query datasette.io?
Query datasette.io is a plugin that allows you to run SQLite queries against a database hosted by Datasette.
What syntax does Datasette support?
Datasette supports most SQLite syntax, but does not support PRAGMA statements.
How can I see the list of tables and their columns?
You can use the following query: select group_concat(sql, ';') from sqlite_master
How can I see the schema for a table, including its columns?
You can use the following query: select sql from sqlite_master where name = 'table_name'
How can I get information about a table's columns?
Instead of using PRAGMA statements, you can use the following query: select * from pragma_table_info('table_name')
Are PRAGMA statements allowed?
No, PRAGMA statements are not allowed. However, you can use the query 'select * from pragma_table_info('table_name')' instead.