home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 869069926

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions issue performed_via_github_app
https://github.com/simonw/datasette/issues/1384#issuecomment-869069926 https://api.github.com/repos/simonw/datasette/issues/1384 869069926 MDEyOklzc3VlQ29tbWVudDg2OTA2OTkyNg== 9599 2021-06-26T22:40:15Z 2021-06-26T22:40:53Z OWNER

The documentation says:

datasette: You can use this to access plugin configuration options via datasette.plugin_config(your_plugin_name), or to execute SQL queries.

That's not accurate: since the plugin hook is a regular function, not an awaitable, you can't use it to run await db.execute(...) so you can't execute SQL queries.

I can fix this with the await-me-maybe pattern, used for other plugin hooks: https://simonwillison.net/2020/Sep/2/await-me-maybe/

BUT... that requires changing the ds.metadata() function to be awaitable, which will affect every existing plugn that uses that documented internal method!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
930807135  
Powered by Datasette · Queries took 1.488ms · About: github-to-sqlite