{"html_url": "https://github.com/simonw/datasette/issues/428#issuecomment-482424314", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/428", "id": 482424314, "node_id": "MDEyOklzc3VlQ29tbWVudDQ4MjQyNDMxNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-04-12T03:33:35Z", "updated_at": "2019-04-12T03:33:35Z", "author_association": "OWNER", "body": "It looks like I accidentally broke the `fts_table` metadata mechanism here: https://github.com/simonw/datasette/commit/3a208a41d4dce35b97eca8b25f37055c3fda5aed#diff-5e0ffd62fced7d46339b9b2cd167c2f9L297\r\n\r\nI'll fix that as part of this work.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 432371762, "label": "Make ?_fts_table=x and ?_fts_pk=y available as URL parameters on table view"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/428#issuecomment-482433121", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/428", "id": 482433121, "node_id": "MDEyOklzc3VlQ29tbWVudDQ4MjQzMzEyMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-04-12T04:30:29Z", "updated_at": "2019-04-12T04:30:29Z", "author_association": "OWNER", "body": "Configured in metadata: https://latest.datasette.io/fixtures/searchable_view_configured_by_metadata?_search=weasel\r\n\r\nConfigured with querystring: https://latest.datasette.io/fixtures/searchable_view?_search=weasel&_fts_table=searchable_fts&_fts_pk=pk", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 432371762, "label": "Make ?_fts_table=x and ?_fts_pk=y available as URL parameters on table view"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/410#issuecomment-482434925", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/410", "id": 482434925, "node_id": "MDEyOklzc3VlQ29tbWVudDQ4MjQzNDkyNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-04-12T04:42:27Z", "updated_at": "2019-04-12T04:42:27Z", "author_association": "OWNER", "body": "You can pass multiple databases as command-line arguments, and each one will be loaded. For example:\r\n\r\n datasette mydb.db otherdb.db\r\n\r\nThen the URLs should be:\r\n\r\nhttp://127.0.0.1:8001/mydb for the first one\r\nhttp://127.0.0.1:8001/otherdb for the second one", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 408518024, "label": "How to setup a multi database environment?"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/425#issuecomment-482439686", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/425", "id": 482439686, "node_id": "MDEyOklzc3VlQ29tbWVudDQ4MjQzOTY4Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-04-12T05:12:12Z", "updated_at": "2019-04-12T05:12:12Z", "author_association": "OWNER", "body": "Fixed: https://latest.datasette.io/fixtures?sql=select+*+from+compound_three_primary_keys+order+by+pk1%2C+pk2%2C+pk3+limit+101&_hide_sql=1", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 430103450, "label": "Submitting SQL on hide page is broken"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/429#issuecomment-482640079", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/429", "id": 482640079, "node_id": "MDEyOklzc3VlQ29tbWVudDQ4MjY0MDA3OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-04-12T16:34:01Z", "updated_at": "2019-04-12T16:34:01Z", "author_association": "OWNER", "body": "UI concept:\r\n\r\n\"fixtures__facetable__10_rows\"\r\n\r\n```\r\n

1 extra where clause:

\r\n

city_id in (select id from facet_cities where name like \"%an%\") [remove]

\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 432636432, "label": "?_where=sql-fragment parameter for table views"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/429#issuecomment-482640250", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/429", "id": 482640250, "node_id": "MDEyOklzc3VlQ29tbWVudDQ4MjY0MDI1MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-04-12T16:34:32Z", "updated_at": "2019-04-12T16:34:32Z", "author_association": "OWNER", "body": "Keeping track of these and building the \"remove\" links correctly is going to be a tiny bit fiddly.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 432636432, "label": "?_where=sql-fragment parameter for table views"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/429#issuecomment-482640383", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/429", "id": 482640383, "node_id": "MDEyOklzc3VlQ29tbWVudDQ4MjY0MDM4Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-04-12T16:34:56Z", "updated_at": "2019-04-12T16:34:56Z", "author_association": "OWNER", "body": "Maybe put this section above the \"view and edit SQL\" link.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 432636432, "label": "?_where=sql-fragment parameter for table views"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/356#issuecomment-482620313", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/356", "id": 482620313, "node_id": "MDEyOklzc3VlQ29tbWVudDQ4MjYyMDMxMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-04-12T15:35:44Z", "updated_at": "2019-04-12T15:35:44Z", "author_association": "OWNER", "body": "One question here is how these facets should be defined in the table page query string.\r\n\r\n#427 started exploring this.\r\n\r\nFor any m2m facet we need to know:\r\n\r\n- what is the join table?\r\n- how is the join table related to our current table?\r\n- what is the table on the other side of the relationship?\r\n- how does that table relate to the join table?\r\n- how should that table be displayed (what's the label column)?\r\n\r\nThe simplest form of m2m relationship can be automatically derived from just knowing the table. We can support that like so:\r\n\r\n?_facet_m2m=tagged\r\n\r\nThis could work automatically if the following constraints turn out to apply:\r\n\r\n- the tagged table has a foreign key back to our table, against our primary key \r\n- the tagged table has a single other foreign key to one other table\r\n- that other table has a single text column we can use as the label (or has a label column defined in metadata)\r\n\r\nIf any of the above rules don't hold, I think the solution is to have explicit configuration. Per #427 this will likely be done using JSON in the query string. Something like this (would be one line but indented for readability):\r\n\r\n```\r\n?_facet_m2m={\r\n \"through\":\"tagged\",\r\n \"through_fk_us\":\"tree_id\",\r\n \"other\":\"tags\",\r\n \"through_fk_other\":\"tag_id\",\r\n \"other_label\": \"tag\"\r\n}\r\n```\r\n\r\nProbably also need a way of specifying the outbound column used on both us and other - if the m2m table isn't linking to the foreign keys.\r\n\r\nI don't yet like the names of the above keys.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 346028655, "label": "Ability to display facet counts for many-to-many relationships"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/427#issuecomment-482626534", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/427", "id": 482626534, "node_id": "MDEyOklzc3VlQ29tbWVudDQ4MjYyNjUzNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-04-12T15:52:53Z", "updated_at": "2019-04-12T15:52:53Z", "author_association": "OWNER", "body": "I just realized: a key part of faceting is being able to correctly apply the facet (and know that it has been applied).\r\n\r\nExisting facets are exact match only, so they can be applied and detected with ?foo=bar\r\n\r\nMore advanced facets like _facet_array and _facet_m2m will need different ways of applying themselves. This needs to be bundled up in the new Facet abstraction somehow.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 431800286, "label": "New design for facet abstraction, including querystring and metadata.json"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/427#issuecomment-482627099", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/427", "id": 482627099, "node_id": "MDEyOklzc3VlQ29tbWVudDQ4MjYyNzA5OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-04-12T15:54:41Z", "updated_at": "2019-04-12T15:54:41Z", "author_association": "OWNER", "body": "Bonus idea: since we are having a Facet abstraction we should allow additional facet type apps to be registered using a plugin.\r\n\r\nFun idea for a (very inefficient) demo plugin: facet-by-emoji! Would work by counting all emoji in text fields using a horrible slow full-scan regular expression, then would apply selected emoji facets using a LIKE query.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 431800286, "label": "New design for facet abstraction, including querystring and metadata.json"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/429#issuecomment-482628978", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/429", "id": 482628978, "node_id": "MDEyOklzc3VlQ29tbWVudDQ4MjYyODk3OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-04-12T16:00:04Z", "updated_at": "2019-04-12T16:00:04Z", "author_association": "OWNER", "body": "I originally thought of this as a plugin but then realized that it's 100% compatible with Datasette's existing arbitrary SQL clauses and would make some of my other projects (especially involving custom queries that still need faceting) a whole lot easier.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 432636432, "label": "?_where=sql-fragment parameter for table views"}, "performed_via_github_app": null}