issue_comments
11 rows where issue = 959999095 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: created_at (date), updated_at (date)
issue 1
- "Query parameters" form shows wrong input fields if query contains "03:31" style times · 11 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
894930013 | https://github.com/simonw/datasette/issues/1421#issuecomment-894930013 | https://api.github.com/repos/simonw/datasette/issues/1421 | IC_kwDOBm6k_c41V4xd | simonw 9599 | 2021-08-09T03:38:06Z | 2021-08-09T03:38:06Z | OWNER | Amusing edge-case: if you run this against a |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
"Query parameters" form shows wrong input fields if query contains "03:31" style times 959999095 | |
894929769 | https://github.com/simonw/datasette/issues/1421#issuecomment-894929769 | https://api.github.com/repos/simonw/datasette/issues/1421 | IC_kwDOBm6k_c41V4tp | simonw 9599 | 2021-08-09T03:36:49Z | 2021-08-09T03:36:49Z | OWNER | SQLite carries a warning about using
I think that's OK here, because of the regular expression fallback. If the format changes in the future in a way that breaks the query the error should be caught and the regex-captured parameters should be returned instead. Hmmm... actually that's not entirely true: https://github.com/simonw/datasette/blob/b1fed48a95516ae84c0f020582303ab50ab817e2/datasette/utils/init.py#L1084-L1091 If the format changes such that the same columns are returned but the I'm going to take that risk for the moment, but I'll actively watch out for problems in the future. If this does turn out to be bad I can always go back to the pure regular expression mechanism. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
"Query parameters" form shows wrong input fields if query contains "03:31" style times 959999095 | |
894929080 | https://github.com/simonw/datasette/issues/1421#issuecomment-894929080 | https://api.github.com/repos/simonw/datasette/issues/1421 | IC_kwDOBm6k_c41V4i4 | simonw 9599 | 2021-08-09T03:33:02Z | 2021-08-09T03:33:02Z | OWNER | Fixed! Fantastic, this one has been bothering me for years. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
"Query parameters" form shows wrong input fields if query contains "03:31" style times 959999095 | |
894927185 | https://github.com/simonw/datasette/issues/1421#issuecomment-894927185 | https://api.github.com/repos/simonw/datasette/issues/1421 | IC_kwDOBm6k_c41V4FR | simonw 9599 | 2021-08-09T03:25:01Z | 2021-08-09T03:25:01Z | OWNER | One catch with this approach: if the SQL query is invalid, the parameters will not be extracted and shown as form fields. Maybe that's completely fine? Why display a form if it's going to break when the user actually runs the query? But it does bother me. I worry that someone who is still iterating on and editing their query before actually starting to use it might find the behaviour confusing. So maybe if the query raises an exception it could fall back on the regular expression results? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
"Query parameters" form shows wrong input fields if query contains "03:31" style times 959999095 | |
894925914 | https://github.com/simonw/datasette/issues/1421#issuecomment-894925914 | https://api.github.com/repos/simonw/datasette/issues/1421 | IC_kwDOBm6k_c41V3xa | simonw 9599 | 2021-08-09T03:20:42Z | 2021-08-09T03:20:42Z | OWNER | I think this works! ```python re_named_parameter = re.compile(":([a-zA-Z0-9]+)") async def derive_named_parameters(db, sql): explain = 'explain {}'.format(sql.strip().rstrip(";")) possible_params = _re_named_parameter.findall(sql) try: results = await db.execute(explain, {p: None for p in possible_params}) return [row["p4"].lstrip(":") for row in results if row["opcode"] == "Variable"] except sqlite3.DatabaseError: return [] ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
"Query parameters" form shows wrong input fields if query contains "03:31" style times 959999095 | |
894925437 | https://github.com/simonw/datasette/issues/1421#issuecomment-894925437 | https://api.github.com/repos/simonw/datasette/issues/1421 | IC_kwDOBm6k_c41V3p9 | simonw 9599 | 2021-08-09T03:19:00Z | 2021-08-09T03:19:00Z | OWNER | This may not work:
The I could try using the regex to pull out candidates and passing |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
"Query parameters" form shows wrong input fields if query contains "03:31" style times 959999095 | |
894922703 | https://github.com/simonw/datasette/issues/1421#issuecomment-894922703 | https://api.github.com/repos/simonw/datasette/issues/1421 | IC_kwDOBm6k_c41V2_P | simonw 9599 | 2021-08-09T03:09:29Z | 2021-08-09T03:09:29Z | OWNER | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
"Query parameters" form shows wrong input fields if query contains "03:31" style times 959999095 | ||
894922145 | https://github.com/simonw/datasette/issues/1421#issuecomment-894922145 | https://api.github.com/repos/simonw/datasette/issues/1421 | IC_kwDOBm6k_c41V22h | simonw 9599 | 2021-08-09T03:07:38Z | 2021-08-09T03:07:38Z | OWNER | I hoped this would work:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
"Query parameters" form shows wrong input fields if query contains "03:31" style times 959999095 | |
894921512 | https://github.com/simonw/datasette/issues/1421#issuecomment-894921512 | https://api.github.com/repos/simonw/datasette/issues/1421 | IC_kwDOBm6k_c41V2so | simonw 9599 | 2021-08-09T03:05:26Z | 2021-08-09T03:05:26Z | OWNER | I may have a way to work around this, using
But... if I run addr | opcode | p1 | p2 | p3 | p4 | p5 | comment -- | -- | -- | -- | -- | -- | -- | -- 20 | ResultRow | 6 | 10 | 0 | | 0 | 21 | Next | 0 | 3 | 0 | | 1 | 22 | Halt | 0 | 0 | 0 | | 0 | 23 | Transaction | 0 | 0 | 35 | 0 | 1 | 24 | Variable | 1 | 2 | 0 | :state | 0 | 25 | Variable | 2 | 3 | 0 | :on_earth | 0 | 26 | String8 | 0 | 4 | 0 | 00:04 | 0 | 27 | Goto | 0 | 1 | 0 | | 0 | Could it be as simple as pulling out those |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
"Query parameters" form shows wrong input fields if query contains "03:31" style times 959999095 | |
894606843 | https://github.com/simonw/datasette/issues/1421#issuecomment-894606843 | https://api.github.com/repos/simonw/datasette/issues/1421 | IC_kwDOBm6k_c41Up37 | simonw 9599 | 2021-08-07T05:17:12Z | 2021-08-07T05:17:12Z | OWNER | Marking this blocked because I don't have a way around the needing-a-SQLite-SQL-parser problem at the moment. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
"Query parameters" form shows wrong input fields if query contains "03:31" style times 959999095 | |
894606796 | https://github.com/simonw/datasette/issues/1421#issuecomment-894606796 | https://api.github.com/repos/simonw/datasette/issues/1421 | IC_kwDOBm6k_c41Up3M | simonw 9599 | 2021-08-07T05:16:39Z | 2021-08-07T05:16:39Z | OWNER | Urgh, yeah I've seen this one before. Fixing it pretty much requires writing a full SQLite SQL syntax parser in Python, which is frustratingly complicated for solving this issue! You can work around this for a canned query by using the optional |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
"Query parameters" form shows wrong input fields if query contains "03:31" style times 959999095 |
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