Query datasette.io

Query datasette.io

Run SQL against data in Datasette.

Name For Model
datasette_datasette_io_3c330f
Update Date
a year ago
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 IdHTTP MethodDescription
1queryGETAccepts 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.