home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 345259115

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/46#issuecomment-345259115 https://api.github.com/repos/simonw/datasette/issues/46 345259115 MDEyOklzc3VlQ29tbWVudDM0NTI1OTExNQ== 9599 2017-11-17T14:32:12Z 2017-11-17T14:32:12Z OWNER

OK, I can confirm that the version in the new docker container supports FTS5, JSON and spatialite!

Notes on how I built the container and tested the spatialite extension are here: https://github.com/simonw/datasette/issues/112#issuecomment-345255655

To confirm that JSON and FTS5 are working, I ran the following:

$ docker run -it -p 8001:8001 6c9ca7e29181 python
Python 3.6.3 (default, Nov  4 2017, 14:24:48) 
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
>>> sqlite3.connect(':memory:').execute('CREATE VIRTUAL TABLE email USING fts5(sender, title, body);')
<sqlite3.Cursor object at 0x7f2d90839960>
>>> list(sqlite3.connect(':memory:').execute('''SELECT json(' { "this" : "is", "a": [ "test" ] } ') '''))
[('{"this":"is","a":["test"]}',)]

If I do the same thing in python3 on my OS X laptop directly, I get this:

$ python3
Python 3.5.1 (default, Apr 18 2016, 11:46:32) 
[GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
>>> sqlite3.connect(':memory:').execute('CREATE VIRTUAL TABLE email USING fts5(sender, title, body);')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
sqlite3.OperationalError: no such module: fts5
>>> list(sqlite3.connect(':memory:').execute('''SELECT json(' { "this" : "is", "a": [ "test" ] } ') '''))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
sqlite3.OperationalError: no such function: json
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
271301468  
Powered by Datasette · Queries took 1.042ms · About: github-to-sqlite