home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where user = 37962604 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

issue 3

  • Add fts offset docs. 1
  • Async support 1
  • Escaping FTS search strings 1

user 1

  • polyrand · 3 ✖

author_association 1

  • NONE 3
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
801816980 https://github.com/simonw/sqlite-utils/issues/246#issuecomment-801816980 https://api.github.com/repos/simonw/sqlite-utils/issues/246 MDEyOklzc3VlQ29tbWVudDgwMTgxNjk4MA== polyrand 37962604 2021-03-18T10:40:32Z 2021-03-18T10:43:04Z NONE

I have found a similar problem, but I only when using that type of query (with * for doing a prefix search). I'm also building something on top of FTS5/sqlite-utils, and the way I decided to handle it was creating a specific function for prefixes. According to the docs, the query can be done in this 2 ways:

sql ... MATCH '"one two thr" * ' ... MATCH 'one + two + thr*'

I thought I could build a query like the first one using this function:

python def prefix(query: str): return f'"{query}" *'

And then I use the output of that function as the query parameter for the standard .search() method in sqlite-utils.

However, my use case is different because I'm the one "deciding" when to use a prefix search, not the end user. I also haven't done many tests, but maybe you found that useful. One thing I could think of is checking if the query has an * at the end, remove it and build the prefix query using the function above.

This is just for prefix queries, I think having the escaping function is still useful for other use cases.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Escaping FTS search strings 831751367  
787150276 https://github.com/simonw/sqlite-utils/issues/242#issuecomment-787150276 https://api.github.com/repos/simonw/sqlite-utils/issues/242 MDEyOklzc3VlQ29tbWVudDc4NzE1MDI3Ng== polyrand 37962604 2021-02-27T21:27:26Z 2021-02-27T21:27:26Z NONE

I had this resource by Seth Michael Larson saved https://github.com/sethmlarson/pycon-async-sync-poster I haven't had a look at it, but it may contain useful info.

On twitter, I mentioned passing an aiosqlite connection during the Database creation. I'm not 100% familiar with the sqlite-utils codebase, so I may be wrong here, but maybe decorating internal functions could be an option? Then they are awaited or not inside the decorator depending on how they are called.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Async support 817989436  
765678057 https://github.com/simonw/sqlite-utils/pull/224#issuecomment-765678057 https://api.github.com/repos/simonw/sqlite-utils/issues/224 MDEyOklzc3VlQ29tbWVudDc2NTY3ODA1Nw== polyrand 37962604 2021-01-22T20:53:06Z 2021-01-23T20:13:27Z NONE

I'm using the FTS methods in sqlite-utils for this website: drwn.io. I wanted to get pagination to have some kind of infinite scrolling in the landing page, and I ended up using that.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Add fts offset docs. 792297010  

Advanced export

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

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
, [performed_via_github_app] TEXT);
CREATE INDEX [idx_issue_comments_issue]
                ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
                ON [issue_comments] ([user]);
Powered by Datasette · Queries took 21.551ms · About: github-to-sqlite
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows