home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where issue = 904537568 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 2

  • simonw 2
  • codecov[bot] 1

author_association 2

  • OWNER 2
  • NONE 1

issue 1

  • Re-display user's query with an error message if an error occurs · 3 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
852693854 https://github.com/simonw/datasette/pull/1346#issuecomment-852693854 https://api.github.com/repos/simonw/datasette/issues/1346 MDEyOklzc3VlQ29tbWVudDg1MjY5Mzg1NA== codecov[bot] 22429695 2021-06-02T03:44:35Z 2021-06-02T03:44:35Z NONE

Codecov Report

Merging #1346 (3bffc35) into main (7b106e1) will increase coverage by 0.14%. The diff coverage is 100.00%.

```diff @@ Coverage Diff @@

main #1346 +/-

========================================== + Coverage 91.56% 91.71% +0.14%
========================================== Files 34 34
Lines 4282 4332 +50
========================================== + Hits 3921 3973 +52
+ Misses 361 359 -2
```

| Impacted Files | Coverage Δ | | |---|---|---| | datasette/app.py | 95.69% <ø> (-0.15%) | :arrow_down: | | datasette/renderer.py | 94.20% <100.00%> (+0.17%) | :arrow_up: | | datasette/utils/__init__.py | 94.36% <100.00%> (+0.05%) | :arrow_up: | | datasette/views/base.py | 95.41% <100.00%> (+0.39%) | :arrow_up: | | datasette/views/database.py | 97.28% <100.00%> (+0.09%) | :arrow_up: | | datasette/views/table.py | 95.90% <100.00%> (+0.07%) | :arrow_up: | | datasette/tracer.py | 85.05% <0.00%> (+3.44%) | :arrow_up: |


Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7b106e1...3bffc35. Read the comment docs.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Re-display user's query with an error message if an error occurs 904537568  
850059328 https://github.com/simonw/datasette/pull/1346#issuecomment-850059328 https://api.github.com/repos/simonw/datasette/issues/1346 MDEyOklzc3VlQ29tbWVudDg1MDA1OTMyOA== simonw 9599 2021-05-28T02:08:10Z 2021-05-28T02:09:25Z OWNER

This is the current test failure, but it actually another problem that we don't have tests in place for errors with different formats and shapes:

``` def test_magic_parameters_cannot_be_used_in_arbitrary_queries(magic_parameters_client): response = magic_parameters_client.get( "/data.json?sql=select+:_header_host&_shape=array" ) assert 400 == response.status

  assert "You did not supply a value for binding 1." == response.json["error"]

E TypeError: list indices must be integers or slices, not str ```

The test fails because response.json here is the empty list [].

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Re-display user's query with an error message if an error occurs 904537568  
850058851 https://github.com/simonw/datasette/pull/1346#issuecomment-850058851 https://api.github.com/repos/simonw/datasette/issues/1346 MDEyOklzc3VlQ29tbWVudDg1MDA1ODg1MQ== simonw 9599 2021-05-28T02:06:46Z 2021-05-28T02:06:46Z OWNER

The one test failure here actually illustrates a larger problem: if the user specifies .json?_shape=array but an error occurs, what should we do?

Prior to this change we return the following JSON: json { "ok": false, "error": "You did not supply a value for binding 1.", "status": 500, "title": null } But this comes from the handle_500 higher level code here: https://github.com/simonw/datasette/blob/eae3084b46e2c3931db12cdef79093ad0e644bce/datasette/app.py#L1251-L1263

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Re-display user's query with an error message if an error occurs 904537568  

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