home / github / issue_comments

Menu
  • GraphQL API

issue_comments: 1074478299

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/1671#issuecomment-1074478299 https://api.github.com/repos/simonw/datasette/issues/1671 1074478299 IC_kwDOBm6k_c5ACzzb 9599 2022-03-21T22:20:26Z 2022-03-21T22:20:26Z OWNER Thinking about options for fixing this... The following query works fine: ```sql select * from test_view where cast(has_expired as text) = '1' ``` I don't want to start using this for every query, because one of the goals of Datasette is to help people who are learning SQL: - #1613 If someone clicks on "View and edit SQL" from a filtered table page I don't want them to have to wonder why that `cast` is there. But... for querying views, the `cast` turns out to be necessary. So one fix would be to get the SQL generating logic to use casts like this any time it is operating against a view. An even better fix would be to detect which columns in a view come from a table and which ones might not, and only use casts for the columns that aren't definitely from a table. The trick I was exploring here might be able to help with that: - #1293 {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 1174655187  
Powered by Datasette · Queries took 1.125ms