home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 894921512

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/1421#issuecomment-894921512 https://api.github.com/repos/simonw/datasette/issues/1421 894921512 IC_kwDOBm6k_c41V2so 9599 2021-08-09T03:05:26Z 2021-08-09T03:05:26Z OWNER

I may have a way to work around this, using explain. Consider this query:

sql select * from facetable where state = :state and on_earth = :on_earth and neighborhood not like '00:04' Datasette currently gets confused and shows three form fields: https://latest.datasette.io/fixtures?sql=select+*+from+facetable%0D%0Awhere+state+%3D+%3Astate%0D%0Aand+on_earth+%3D+%3Aon_earth%0D%0Aand+neighborhood+not+like+%2700%3A04%27&state=&on_earth=&04=

But... if I run explain against that I get this (truncated):

addr | opcode | p1 | p2 | p3 | p4 | p5 | comment -- | -- | -- | -- | -- | -- | -- | -- 20 | ResultRow | 6 | 10 | 0 |   | 0 |   21 | Next | 0 | 3 | 0 |   | 1 |   22 | Halt | 0 | 0 | 0 |   | 0 |   23 | Transaction | 0 | 0 | 35 | 0 | 1 |   24 | Variable | 1 | 2 | 0 | :state | 0 |   25 | Variable | 2 | 3 | 0 | :on_earth | 0 |   26 | String8 | 0 | 4 | 0 | 00:04 | 0 |   27 | Goto | 0 | 1 | 0 |   | 0 |  

Could it be as simple as pulling out those Variable rows to figure out the names of the variables in the query?

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