issue_comments
11 rows where issue = 1352932716 and user = 9599 sorted by updated_at descending
This data as json, CSV (advanced)
issue 1
- sqlite-utils query --functions mechanism for registering extra functions · 11 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
1238873948 | https://github.com/simonw/sqlite-utils/issues/471#issuecomment-1238873948 | https://api.github.com/repos/simonw/sqlite-utils/issues/471 | IC_kwDOCGYnMM5J17dc | simonw 9599 | 2022-09-07T03:46:26Z | 2022-09-07T03:46:26Z | OWNER |
Not sure what you mean here? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
sqlite-utils query --functions mechanism for registering extra functions 1352932716 | |
1229125114 | https://github.com/simonw/sqlite-utils/issues/471#issuecomment-1229125114 | https://api.github.com/repos/simonw/sqlite-utils/issues/471 | IC_kwDOCGYnMM5JQvX6 | simonw 9599 | 2022-08-27T05:08:58Z | 2022-08-27T05:08:58Z | OWNER | Testing
|
{ "total_count": 2, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 1, "rocket": 0, "eyes": 0 } |
sqlite-utils query --functions mechanism for registering extra functions 1352932716 | |
1229124549 | https://github.com/simonw/sqlite-utils/issues/471#issuecomment-1229124549 | https://api.github.com/repos/simonw/sqlite-utils/issues/471 | IC_kwDOCGYnMM5JQvPF | simonw 9599 | 2022-08-27T05:03:39Z | 2022-08-27T05:03:39Z | OWNER | I don't think I need separate documentation for |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
sqlite-utils query --functions mechanism for registering extra functions 1352932716 | |
1229124379 | https://github.com/simonw/sqlite-utils/issues/471#issuecomment-1229124379 | https://api.github.com/repos/simonw/sqlite-utils/issues/471 | IC_kwDOCGYnMM5JQvMb | simonw 9599 | 2022-08-27T05:02:21Z | 2022-08-27T05:02:21Z | OWNER | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
sqlite-utils query --functions mechanism for registering extra functions 1352932716 | ||
1229120899 | https://github.com/simonw/sqlite-utils/issues/471#issuecomment-1229120899 | https://api.github.com/repos/simonw/sqlite-utils/issues/471 | IC_kwDOCGYnMM5JQuWD | simonw 9599 | 2022-08-27T04:31:35Z | 2022-08-27T04:32:38Z | OWNER | I should add this |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
sqlite-utils query --functions mechanism for registering extra functions 1352932716 | |
1229120653 | https://github.com/simonw/sqlite-utils/issues/471#issuecomment-1229120653 | https://api.github.com/repos/simonw/sqlite-utils/issues/471 | IC_kwDOCGYnMM5JQuSN | simonw 9599 | 2022-08-27T04:29:49Z | 2022-08-27T04:30:03Z | OWNER | Found a fix for that! I replaced this:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
sqlite-utils query --functions mechanism for registering extra functions 1352932716 | |
1229120104 | https://github.com/simonw/sqlite-utils/issues/471#issuecomment-1229120104 | https://api.github.com/repos/simonw/sqlite-utils/issues/471 | IC_kwDOCGYnMM5JQuJo | simonw 9599 | 2022-08-27T04:25:39Z | 2022-08-27T04:25:39Z | OWNER | This works: ``` sqlite-utils :memory: 'select extract_domain("https://www.google.com/blah")' --functions ' from urllib.parse import urlparse def extract_domain(url): global urlparse return urlparse(url).netloc ' ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
sqlite-utils query --functions mechanism for registering extra functions 1352932716 | |
1229119999 | https://github.com/simonw/sqlite-utils/issues/471#issuecomment-1229119999 | https://api.github.com/repos/simonw/sqlite-utils/issues/471 | IC_kwDOCGYnMM5JQuH_ | simonw 9599 | 2022-08-27T04:24:58Z | 2022-08-27T04:24:58Z | OWNER | I've encountered this problem before: https://sqlite-utils.datasette.io/en/stable/cli.html#cli-convert-complex
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
sqlite-utils query --functions mechanism for registering extra functions 1352932716 | |
1229119171 | https://github.com/simonw/sqlite-utils/issues/471#issuecomment-1229119171 | https://api.github.com/repos/simonw/sqlite-utils/issues/471 | IC_kwDOCGYnMM5JQt7D | simonw 9599 | 2022-08-27T04:18:28Z | 2022-08-27T04:18:28Z | OWNER | I tried this: ``` sqlite-utils :memory: 'select extract_domain("https://www.google.com/blah")' --functions ' from urllib.parse import urlparse def extract_domain(url):
from urllib.parse import urlparse
return urlparse(url).netloc
'
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
sqlite-utils query --functions mechanism for registering extra functions 1352932716 | |
1229118619 | https://github.com/simonw/sqlite-utils/issues/471#issuecomment-1229118619 | https://api.github.com/repos/simonw/sqlite-utils/issues/471 | IC_kwDOCGYnMM5JQtyb | simonw 9599 | 2022-08-27T04:14:52Z | 2022-08-27T04:14:52Z | OWNER | Quick prototype: ```diff diff --git a/sqlite_utils/cli.py b/sqlite_utils/cli.py index 43e76fa..5dee4f6 100644 --- a/sqlite_utils/cli.py +++ b/sqlite_utils/cli.py @@ -1633,6 +1633,9 @@ def drop_view(path, view, ignore, load_extension): type=(str, str), help="Named :parameters for SQL query", ) +@click.option( + "--functions", help="Python code defining one or more custom SQL functions" +) @load_extension_option def query( path, @@ -1649,6 +1652,7 @@ def query( raw, param, load_extension, + functions, ): """Execute SQL query and return the results as JSON @@ -1665,6 +1669,16 @@ def query( _load_extensions(db, load_extension) db.register_fts4_bm25()
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
sqlite-utils query --functions mechanism for registering extra functions 1352932716 | |
1229116423 | https://github.com/simonw/sqlite-utils/issues/471#issuecomment-1229116423 | https://api.github.com/repos/simonw/sqlite-utils/issues/471 | IC_kwDOCGYnMM5JQtQH | simonw 9599 | 2022-08-27T04:00:52Z | 2022-08-27T04:00:52Z | OWNER | Alternative design would be
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
sqlite-utils query --functions mechanism for registering extra functions 1352932716 |
Advanced export
JSON shape: default, array, newline-delimited, object
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]);
user 1