home / github

Menu
  • GraphQL API

issues

Table actions
  • GraphQL API for issues

11 rows where "updated_at" is on date 2021-08-18

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: user, state, comments, closed_at, author_association, repo, type, created_at (date), updated_at (date), closed_at (date)

id ▼ node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association pull_request body repo type active_lock_reason performed_via_github_app reactions draft state_reason
465815372 MDU6SXNzdWU0NjU4MTUzNzI= 37 Experiment with type hints simonw 9599 closed 0     6 2019-07-09T14:30:34Z 2021-08-18T21:48:57Z 2021-08-18T21:48:57Z OWNER   Since it's designed to be used in Jupyter or for rapid prototyping in an IDE (and it's still pretty small) `sqlite-utils` feels like a great candidate for me to finally try out Python type hints. https://veekaybee.github.io/2019/07/08/python-type-hints/ is good. It suggests the mypy docs for getting started: https://mypy.readthedocs.io/en/latest/existing_code.html plus this tutorial: https://pymbook.readthedocs.io/en/latest/typehinting.html sqlite-utils 140912432 issue     {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/37/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
831751367 MDU6SXNzdWU4MzE3NTEzNjc= 246 Escaping FTS search strings DeNeutoy 16001974 closed 0     4 2021-03-15T12:15:09Z 2021-08-18T18:57:13Z 2021-08-18T18:43:12Z CONTRIBUTOR   Thanks for the excellent library, it's very nice to use! I've been building some in memory search functionality for a data annotation tool i'm making, and I got tripped up a little bit with escaping the full text search queries. First I tried using `db.quote(q)`, which doesn't work, because sqlite FTS has it's own (separate)[ query syntax](https://www2.sqlite.org/fts5.html#full_text_query_syntax). You can see this happening here also: http://search-24ways.herokuapp.com/24ways-f8f455f/articles?_search=acces%2A I got around this by aggressively escaping quotes inside the query string like this: ```python quoted = q.replace('"', '""') quoted = f'"{quoted}"' print(quoted) results = db["data"].search(quoted, columns=["id"]) return [x["id"] for x in results] ``` This works in the sense it doesn't crash, but it also removes access to the search query syntax. Given the well specified definition, it might be possible for sqlite-utils to provide a `db.quote_query(q)` which would intelligently escape a query whilst leaving the syntax intact. This would be very nice! sqlite-utils 140912432 issue     {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/246/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
832687563 MDExOlB1bGxSZXF1ZXN0NTkzODA1ODA0 247 FTS quote functionality from datasette DeNeutoy 16001974 closed 0     2 2021-03-16T11:17:34Z 2021-08-18T18:43:12Z 2021-08-18T18:43:12Z CONTRIBUTOR simonw/sqlite-utils/pulls/247 Addresses #246 - this is a bit of a kludge because it doesn't actually *validate* the FTS string, just makes sure that it will not crash when executed, but I figured that building a query parser is a bit out of the scope of sqlite-utils and if you actually want to use the query language, you probably need to parse that yourself. sqlite-utils 140912432 pull     {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/247/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 0  
913135723 MDU6SXNzdWU5MTMxMzU3MjM= 266 Add some types, enforce with mypy simonw 9599 closed 0     3 2021-06-07T06:05:56Z 2021-08-18T22:25:38Z 2021-08-18T22:25:38Z OWNER   A good starting point would be adding type information to the members of these named tuples and the introspection methods that return them: https://github.com/simonw/sqlite-utils/blob/9dff7a38831d471b1dff16d40d89eb5c3b4e84d6/sqlite_utils/db.py#L51-L75 sqlite-utils 140912432 issue     {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/266/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
931752773 MDU6SXNzdWU5MzE3NTI3NzM= 294 Add a `sqlite-utils memory` example to the README simonw 9599 closed 0     0 2021-06-28T16:35:59Z 2021-08-18T21:40:03Z 2021-08-18T21:40:03Z OWNER     sqlite-utils 140912432 issue     {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/294/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
934123448 MDU6SXNzdWU5MzQxMjM0NDg= 295 Insert with --tsv and --no-headers give error about --nl arguments davidscotson 7288187 closed 0     1 2021-06-30T21:01:01Z 2021-08-18T20:19:04Z 2021-08-18T20:18:57Z NONE   Not quite sure if this is a bug, or just an assumption I made but I thought `--tsv` and `--no-headers` would work together when inserting from a file, and currently they seem not to (sqlite-utils, version 3.12, installed on Mac OS X via brew) Instead it says: `Error: Use just one of --nl, --csv or --tsv` As if it has interpreted the --no-headers as --nl. The --help does specifically say CSV: `--no-headers CSV file has no header row` And this heading in the documentation also only refers to CSV, but the text does mention TSV in passing, and I'd generally expect them to behave the same in most cases. https://sqlite-utils.datasette.io/en/stable/cli.html#csv-files-without-a-header-row sqlite-utils 140912432 issue     {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/295/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
944326512 MDU6SXNzdWU5NDQzMjY1MTI= 296 `table.search(..., quote=True)` parameter and `sqlite-utils search --quote` option deafmute1 32427188 closed 0     6 2021-07-14T11:26:47Z 2021-08-18T20:13:12Z 2021-08-18T20:10:48Z NONE   Hi, Recently got this error: ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/ethan/git/music-metadata-indexer/src/mmindexer/__init__.py", line 38, in <module> start("/home/ethan/git/music-metadata-indexer/sample", "/home/ethan/git/music-metadata-indexer/test.db") File "/home/ethan/git/music-metadata-indexer/src/mmindexer/__init__.py", line 23, in start scanner.build_database() File "/home/ethan/git/music-metadata-indexer/src/mmindexer/scan.py", line 79, in build_database _import_song(self.db, Path(dirpath).joinpath(f), self.logger) File "/home/ethan/git/music-metadata-indexer/src/mmindexer/scan.py", line 23, in _import_song db.add_song(filepath) File "/home/ethan/git/music-metadata-indexer/src/mmindexer/index.py", line 166, in add_song for match in self.search("albums", album): File "/home/ethan/git/music-metadata-indexer/env/lib/python3.9/site-packages/sqlite_utils/db.py", line 1625, in search cursor = self.db.execute( File "/home/ethan/git/music-metadata-indexer/env/lib/python3.9/site-packages/sqlite_utils/db.py", line 243, in execute return self.conn.execute(sql, parameters) sqlite3.OperationalError: fts5: syntax error near "." ``` So, the error seems to suggest there was a "." character somewhere in the SQL command that was causing the error. I did a little digging and found this in the docs: https://www.sqlite.org/fts5.html#fts5_strings. "." is one of the many prohibited characters. My solution was to just strip these out of the query using this line `query = query.translate({e: None for e in itertools.chain(range(0,26), range(27, 48), range(58,65), range(91,95), [96], range(123,128))})` Perhaps this could be included into the `table.search()` function? sqlite-utils 140912432 issue     {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/296/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
965210966 MDU6SXNzdWU5NjUyMTA5NjY= 314 Type signatures for `.create_table()` and `.create_table_sql()` and `.create()` and `Table.__init__` simonw 9599 closed 0     2 2021-08-10T18:03:59Z 2021-08-18T22:25:21Z 2021-08-18T22:25:21Z OWNER   > Adding type signatures to `create_table()` and `.create_table_sql()` is a bit too involved, I'll do that in a separate issue. _Originally posted by @simonw in https://github.com/simonw/sqlite-utils/issues/312#issuecomment-896200682_ sqlite-utils 140912432 issue     {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/314/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
972827346 MDU6SXNzdWU5NzI4MjczNDY= 317 Link to a better example on docs index simonw 9599 closed 0     1 2021-08-17T15:43:40Z 2021-08-18T18:31:43Z 2021-08-18T18:31:43Z OWNER   https://github.com/simonw/sqlite-utils/blob/7a19822ac9ee24be2fbb4c2326a0bf2f3d2d9c4d/docs/index.rst#L39 Is a very old example sqlite-utils 140912432 issue     {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/317/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
972918533 MDU6SXNzdWU5NzI5MTg1MzM= 1438 Query page .csv and .json links are not correctly URL-encoded on Vercel under unknown specific conditions simonw 9599 open 0     7 2021-08-17T17:35:36Z 2021-08-18T00:22:23Z   OWNER   > Confirmed: https://thesession.vercel.app/thesession?sql=select+*+from+tunes+where+name+like+%22%25wise+maid%25%22%0D%0A is a page where the URL correctly encoded `%` as `%25` - but then in the HTML on that page that links to the CSV and JSON versions we get this: > > ```html > <p class="export-links">This data as > <a href="/thesession.json?sql=select * from tunes where name like &#34;%wise maid%&#34;">json</a>, > <a href="/thesession.csv?sql=select * from tunes where name like &#34;%wise maid%&#34;&amp;_size=max">CSV</a> > </p> > ``` Those CSV and JSON links are incorrect. _Originally posted by @simonw in https://github.com/simonw/datasette-publish-vercel/issues/48#issuecomment-900497579_ datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1438/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
974067156 MDU6SXNzdWU5NzQwNjcxNTY= 318 Research: handle gzipped CSV directly simonw 9599 open 0     2 2021-08-18T21:23:04Z 2021-08-18T21:25:30Z   OWNER   Would it be worthwhile for the `sqlite-utils` command-line tool to grow features to efficiently directly interact with gzipped CSV data? Maybe add `--gz` options to both `insert` and to the various commands that output query results. sqlite-utils 140912432 issue     {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/318/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issues] (
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [number] INTEGER,
   [title] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [state] TEXT,
   [locked] INTEGER,
   [assignee] INTEGER REFERENCES [users]([id]),
   [milestone] INTEGER REFERENCES [milestones]([id]),
   [comments] INTEGER,
   [created_at] TEXT,
   [updated_at] TEXT,
   [closed_at] TEXT,
   [author_association] TEXT,
   [pull_request] TEXT,
   [body] TEXT,
   [repo] INTEGER REFERENCES [repos]([id]),
   [type] TEXT
, [active_lock_reason] TEXT, [performed_via_github_app] TEXT, [reactions] TEXT, [draft] INTEGER, [state_reason] TEXT);
CREATE INDEX [idx_issues_repo]
                ON [issues] ([repo]);
CREATE INDEX [idx_issues_milestone]
                ON [issues] ([milestone]);
CREATE INDEX [idx_issues_assignee]
                ON [issues] ([assignee]);
CREATE INDEX [idx_issues_user]
                ON [issues] ([user]);
Powered by Datasette · Queries took 1153.709ms · About: simonw/datasette-graphql