home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where issue = 556814876 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 2

  • simonw 3
  • clausjuhl 2

author_association 2

  • OWNER 3
  • NONE 2

issue 1

  • Escape_fts5_query-hookimplementation does not work with queries to standard tables · 5 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
580028669 https://github.com/simonw/datasette/issues/662#issuecomment-580028669 https://api.github.com/repos/simonw/datasette/issues/662 MDEyOklzc3VlQ29tbWVudDU4MDAyODY2OQ== simonw 9599 2020-01-30T00:30:19Z 2020-01-30T00:30:19Z OWNER

I just shipped 0.34: https://datasette.readthedocs.io/en/stable/changelog.html#v0-34

{
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Escape_fts5_query-hookimplementation does not work with queries to standard tables 556814876  
579864036 https://github.com/simonw/datasette/issues/662#issuecomment-579864036 https://api.github.com/repos/simonw/datasette/issues/662 MDEyOklzc3VlQ29tbWVudDU3OTg2NDAzNg== clausjuhl 2181410 2020-01-29T17:17:01Z 2020-01-29T17:17:01Z NONE

This is excellent news. I'll wait until version 0.34. It would be tiresome to rewrite all standard-queries into custom queries. Thank you!

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Escape_fts5_query-hookimplementation does not work with queries to standard tables 556814876  
579832857 https://github.com/simonw/datasette/issues/662#issuecomment-579832857 https://api.github.com/repos/simonw/datasette/issues/662 MDEyOklzc3VlQ29tbWVudDU3OTgzMjg1Nw== simonw 9599 2020-01-29T16:12:08Z 2020-01-29T16:12:08Z OWNER

I think I see what's happening here.

Adding the new plugin isn't quite enough: the change I made to master also alters the table view code to call the new function:

https://github.com/simonw/datasette/commit/3c861f363df02a59a67c59036278338e4760d2ed#diff-5e0ffd62fced7d46339b9b2cd167c2f9

If you add the escape function as a plugin in Datasette 0.33 you will have to use a custom SQL query to run it, like this:

https://latest.datasette.io/fixtures?sql=select+pk%2C+text1%2C+text2%2C+%5Bname+with+.+and+spaces%5D+from+searchable+where+rowid+in+%28select+rowid+from+searchable_fts+where+searchable_fts+match+escape_fts%28%3Asearch%29%29+order+by+pk+limit+101&search=Dog

Or you can hold out for Datasette 0.34 which will have this fix and will hopefully ship within the next 24 hours.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Escape_fts5_query-hookimplementation does not work with queries to standard tables 556814876  
579798917 https://github.com/simonw/datasette/issues/662#issuecomment-579798917 https://api.github.com/repos/simonw/datasette/issues/662 MDEyOklzc3VlQ29tbWVudDU3OTc5ODkxNw== clausjuhl 2181410 2020-01-29T15:08:57Z 2020-01-29T15:08:57Z NONE

Hi Simon

Thankt you for a quick reply. Here are a few examples of urls, where I search the 'cases_fts'-virtual table for tokens in the title-column. It returns the same results, wether the other query-params are present or not.

Searching for sky http://localhost:8001/db-7596a4e/cases?_search_title=sky&year__gte=1997&year__lte=2017&_sort_desc=last_deliberation_date Returns searchresults

Searching for sky http://localhost:8001/db-7596a4e/cases?_search_title=sky&year__gte=1997&year__lte=2017&_sort_desc=last_deliberation_date Returns searchresults

Searching for sky-tog http://localhost:8001/db-7596a4e/cases?_search_title=sky-tog&year__gte=1997&year__lte=2017&_sort_desc=last_deliberation_date Throws: No such column: tog

searching for sky+ http://localhost:8001/db-7596a4e/cases?_search_title=sky%2B&year__gte=1997&year__lte=2017&_sort_desc=last_deliberation_date Throws: Invalid SQL: fts5: syntax error near ""

Searching for "madpakke" (including double quotes) http://localhost:8001/db-7596a4e/cases?_search_title=%22madpakke%22&year__gte=1997&year__lte=2017&_sort_desc=last_deliberation_date Returns searchresults even though 'madpakke' only appears in the fulltextindex without quotes

As I said, my other plugins work just fine, and I just copied your sql_functions.py from the datasette-repo.

Thanks!

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Escape_fts5_query-hookimplementation does not work with queries to standard tables 556814876  
579787057 https://github.com/simonw/datasette/issues/662#issuecomment-579787057 https://api.github.com/repos/simonw/datasette/issues/662 MDEyOklzc3VlQ29tbWVudDU3OTc4NzA1Nw== simonw 9599 2020-01-29T14:43:46Z 2020-01-29T14:43:46Z OWNER

Can you share the exact queries you're having trouble with? The SQL itself or even just the full URL to the page (it doesn't matter if it's to a Datasette instance that isn't available online - I just need to see the URL parameters).

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Escape_fts5_query-hookimplementation does not work with queries to standard tables 556814876  

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 23.691ms · About: github-to-sqlite
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows