home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 709531343

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/894#issuecomment-709531343 https://api.github.com/repos/simonw/datasette/issues/894 709531343 MDEyOklzc3VlQ29tbWVudDcwOTUzMTM0Mw== 9599 2020-10-15T19:03:12Z 2020-10-15T19:03:12Z OWNER

The Sort by <select> menu needs a rethink: https://github.com/simonw/datasette/blob/4f7c0ebd85ccd8c1853d7aa0147628f7c1b749cc/datasette/templates/table.html#L80-L87

If it's going to include sort by numeric options it needs a different format - since ?_sort=colname needs to also support ?_sort=numeric_colname - but shouldn't clash with a weird column already named numeric_colname.

Can I come up with a value syntax for this that is guaranteed not to clash with a weirdly named existing column?

I think so. I could use {"type": "numeric", "column": "mycolumn"} as the value - then if a column has a name that is itself valid JSON (weird but possible) the _sort= value would be {"type": "default", "column": "{\"type\": \"numeric\", \"name\": \"column\"}"}.

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