{"html_url": "https://github.com/simonw/datasette/issues/44#issuecomment-345343079", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/44", "id": 345343079, "node_id": "MDEyOklzc3VlQ29tbWVudDM0NTM0MzA3OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-11-17T19:29:43Z", "updated_at": "2017-11-17T19:29:43Z", "author_association": "OWNER", "body": "Should this support sum/avg/etc as well?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 269731374, "label": "?_group_count=country - return counts by specific column(s)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/36#issuecomment-345262738", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/36", "id": 345262738, "node_id": "MDEyOklzc3VlQ29tbWVudDM0NTI2MjczOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-11-17T14:45:37Z", "updated_at": "2017-11-17T14:45:37Z", "author_association": "OWNER", "body": "Consider for example https://fivethirtyeight.datasettes.com/fivethirtyeight/inconvenient-sequel%2Fratings\r\n\r\n\"fivethirtyeight__inconvenient-sequel_ratings\"\r\n\r\nThe idea here is to be able to support querystring parameters like this:\r\n\r\n* `?timestamp___date=2017-07-17` - return every item where the timestamp falls on that date\r\n* `?timestamp___year=2017` - return every item where the timestamp falls within 2017\r\n* `?timestamp___month=1` - return every item where the month component is January\r\n* `?timestamp___day=10` - return every item where the day-of-the-month component is 10\r\n\r\nThis is similar to #64 but a fair bit more complicated. \r\n\r\nSQLite date functions are documented here: https://sqlite.org/lang_datefunc.html\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 268262480, "label": "date, year, month and day querystring lookups"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/64#issuecomment-345260784", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/64", "id": 345260784, "node_id": "MDEyOklzc3VlQ29tbWVudDM0NTI2MDc4NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-11-17T14:38:21Z", "updated_at": "2017-11-17T14:38:21Z", "author_association": "OWNER", "body": "This was fixed by ed2b3f25beac720f14869350baacc5f62b065194 in #107 - thanks @raynae!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 273181020, "label": "Support for ?field__isnull=1 or similar"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/46#issuecomment-345259115", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/46", "id": 345259115, "node_id": "MDEyOklzc3VlQ29tbWVudDM0NTI1OTExNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-11-17T14:32:12Z", "updated_at": "2017-11-17T14:32:12Z", "author_association": "OWNER", "body": "OK, I can confirm that the version in the new docker container supports FTS5, JSON *and* spatialite!\r\n\r\nNotes on how I built the container and tested the spatialite extension are here: https://github.com/simonw/datasette/issues/112#issuecomment-345255655\r\n\r\nTo confirm that JSON and FTS5 are working, I ran the following:\r\n\r\n $ docker run -it -p 8001:8001 6c9ca7e29181 python\r\n Python 3.6.3 (default, Nov 4 2017, 14:24:48) \r\n [GCC 6.3.0 20170516] on linux\r\n Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n >>> import sqlite3\r\n >>> sqlite3.connect(':memory:').execute('CREATE VIRTUAL TABLE email USING fts5(sender, title, body);')\r\n \r\n >>> list(sqlite3.connect(':memory:').execute('''SELECT json(' { \"this\" : \"is\", \"a\": [ \"test\" ] } ') '''))\r\n [('{\"this\":\"is\",\"a\":[\"test\"]}',)]\r\n\r\nIf I do the same thing in python3 on my OS X laptop directly, I get this:\r\n\r\n $ python3\r\n Python 3.5.1 (default, Apr 18 2016, 11:46:32) \r\n [GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.29)] on darwin\r\n Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n >>> import sqlite3\r\n >>> sqlite3.connect(':memory:').execute('CREATE VIRTUAL TABLE email USING fts5(sender, title, body);')\r\n Traceback (most recent call last):\r\n File \"\", line 1, in \r\n sqlite3.OperationalError: no such module: fts5\r\n >>> list(sqlite3.connect(':memory:').execute('''SELECT json(' { \"this\" : \"is\", \"a\": [ \"test\" ] } ') '''))\r\n Traceback (most recent call last):\r\n File \"\", line 1, in \r\n sqlite3.OperationalError: no such function: json\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 271301468, "label": "Dockerfile should build more recent SQLite with FTS5 and spatialite support"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/115#issuecomment-345256576", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/115", "id": 345256576, "node_id": "MDEyOklzc3VlQ29tbWVudDM0NTI1NjU3Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-11-17T14:22:51Z", "updated_at": "2017-11-17T14:22:51Z", "author_association": "OWNER", "body": "This is great - I've been frustrated by how CodeMirror prevents me from hitting tab-enter to activate the \"Run SQL\" button. ", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 274877366, "label": "Add keyboard shortcut to execute SQL query"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/112#issuecomment-345255655", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/112", "id": 345255655, "node_id": "MDEyOklzc3VlQ29tbWVudDM0NTI1NTY1NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-11-17T14:19:23Z", "updated_at": "2017-11-17T14:19:23Z", "author_association": "OWNER", "body": "I tesed this by first building and running a container using the new\r\nDockerfile from #114:\r\n\r\n docker build .\r\n docker run -it -p 8001:8001 6c9ca7e29181 /bin/sh\r\n\r\nThen I ran this inside the container itself:\r\n\r\n apt update && apt-get install wget -y \\\r\n && wget http://www.gaia-gis.it/spatialite-2.3.1/test-2.3.sqlite.gz \\\r\n && gunzip test-2.3.sqlite.gz \\\r\n && mv test-2.3.sqlite test23.sqlite \\\r\n && datasette -h 0.0.0.0 test23.sqlite\r\n\r\nI visited this URL to confirm I got an error due to spatialite not being\r\nloaded:\r\n\r\nhttp://localhost:8001/test23-c88bc35?sql=select+ST_AsText%28Geometry%29+from+HighWays+limit+1\r\n\r\nThen I checked that loading it with `--load-extension` worked correctly:\r\n\r\n datasette -h 0.0.0.0 test23.sqlite \\\r\n --load-extension=/usr/lib/x86_64-linux-gnu/mod_spatialite.so\r\n\r\nThen, finally, I tested it with the new environment variable option:\r\n\r\n SQLITE_EXTENSIONS=/usr/lib/x86_64-linux-gnu/mod_spatialite.so \\\r\n datasette -h 0.0.0.0 test23.sqlite\r\n\r\nRunning it with an invalid environment variable option shows an error:\r\n\r\n $ SQLITE_EXTENSIONS=/usr/lib/x86_64-linux-gnu/blah.so datasette \\\r\n -h 0.0.0.0 test23.sqlite\r\n Usage: datasette -h [OPTIONS] [FILES]...\r\n\r\n Error: Invalid value for \"--load-extension\": Path \"/usr/lib/x86_64-linux-gnu/blah.so\" does not exist.\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 274617240, "label": "Allow --load-extension to be set via environment variables"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/85#issuecomment-345242447", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/85", "id": 345242447, "node_id": "MDEyOklzc3VlQ29tbWVudDM0NTI0MjQ0Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-11-17T13:22:33Z", "updated_at": "2017-11-17T13:23:14Z", "author_association": "OWNER", "body": "I could support explicit label columns using additional arguments to `datasette serve`:\r\n\r\n datasette serve mydb.py --label-column mydb:table1:name --label-column mydb:table2:title\r\n\r\nThis would mean \"in mydb, set the label column for table1 to name, and the label column for table2 to title\"", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 273678673, "label": "Detect foreign keys and use them to link HTML pages together"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/85#issuecomment-345150048", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/85", "id": 345150048, "node_id": "MDEyOklzc3VlQ29tbWVudDM0NTE1MDA0OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-11-17T05:35:25Z", "updated_at": "2017-11-17T05:35:25Z", "author_association": "OWNER", "body": "`csvs-to-sqlite` is now capable of generating databases with foreign key lookup tables: https://github.com/simonw/csvs-to-sqlite/releases/tag/0.3", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 273678673, "label": "Detect foreign keys and use them to link HTML pages together"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/46#issuecomment-345138347", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/46", "id": 345138347, "node_id": "MDEyOklzc3VlQ29tbWVudDM0NTEzODM0Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-11-17T03:52:25Z", "updated_at": "2017-11-17T03:52:25Z", "author_association": "OWNER", "body": "We now have a Dockerfile that compiles spatialite! https://github.com/simonw/datasette/pull/114/commits/6c6b63d890529eeefcefb7ab126ea3bd7b2315c1", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 271301468, "label": "Dockerfile should build more recent SQLite with FTS5 and spatialite support"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/114#issuecomment-345138134", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/114", "id": 345138134, "node_id": "MDEyOklzc3VlQ29tbWVudDM0NTEzODEzNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-11-17T03:50:38Z", "updated_at": "2017-11-17T03:50:38Z", "author_association": "OWNER", "body": "Fantastic! Thank you very much.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 274733145, "label": "Add spatialite, switch to debian and local build"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/107#issuecomment-345117690", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/107", "id": 345117690, "node_id": "MDEyOklzc3VlQ29tbWVudDM0NTExNzY5MA==", "user": {"value": 3433657, "label": "raynae"}, "created_at": "2017-11-17T01:29:41Z", "updated_at": "2017-11-17T01:29:41Z", "author_association": "CONTRIBUTOR", "body": "Thanks for bearing with me. I was getting a message about my branch diverging when I tried to push after rebasing, so I merged master into isnull, seems like that did the trick. Let me know if I should make any corrections.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 274343647, "label": "add support for ?field__isnull=1"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/107#issuecomment-345108644", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/107", "id": 345108644, "node_id": "MDEyOklzc3VlQ29tbWVudDM0NTEwODY0NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-11-17T00:34:46Z", "updated_at": "2017-11-17T00:34:46Z", "author_association": "OWNER", "body": "Looks like your tests are failing because of a bug which I fixed in https://github.com/simonw/datasette/commit/9199945a1bcec4852e1cb866eb3642614dd32a48 - if you rebase to master the tests should pass.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 274343647, "label": "add support for ?field__isnull=1"}, "performed_via_github_app": null}