home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

8 rows where issue = 1473814539 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 3

  • simonw 6
  • davidbgk 1
  • codecov[bot] 1

author_association 3

  • OWNER 6
  • CONTRIBUTOR 1
  • NONE 1

issue 1

  • /db/table/-/upsert · 8 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
1339906241 https://github.com/simonw/datasette/pull/1931#issuecomment-1339906241 https://api.github.com/repos/simonw/datasette/issues/1931 IC_kwDOBm6k_c5P3VjB codecov[bot] 22429695 2022-12-06T19:33:32Z 2022-12-08T01:04:56Z NONE

Codecov Report

Base: 90.42% // Head: 91.77% // Increases project coverage by +1.34% :tada:

Coverage data is based on head (645be0f) compared to base (cab5b60). Patch coverage: 95.55% of modified lines in pull request are covered.

:exclamation: Current head 645be0f differs from pull request most recent head 7cd6fd9. Consider uploading reports for the commit 7cd6fd9 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1931 +/- ## ========================================== + Coverage 90.42% 91.77% +1.34% ========================================== Files 36 36 Lines 5057 5019 -38 ========================================== + Hits 4573 4606 +33 + Misses 484 413 -71 ``` | [Impacted Files](https://codecov.io/gh/simonw/datasette/pull/1931?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) | Coverage Δ | | |---|---|---| | [datasette/views/special.py](https://codecov.io/gh/simonw/datasette/pull/1931/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3ZpZXdzL3NwZWNpYWwucHk=) | `79.41% <0.00%> (ø)` | | | [datasette/views/table.py](https://codecov.io/gh/simonw/datasette/pull/1931/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3ZpZXdzL3RhYmxlLnB5) | `92.44% <97.43%> (+0.20%)` | :arrow_up: | | [datasette/app.py](https://codecov.io/gh/simonw/datasette/pull/1931/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL2FwcC5weQ==) | `94.42% <100.00%> (+<0.01%)` | :arrow_up: | | [datasette/default\_permissions.py](https://codecov.io/gh/simonw/datasette/pull/1931/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL2RlZmF1bHRfcGVybWlzc2lvbnMucHk=) | `94.81% <100.00%> (+0.07%)` | :arrow_up: | | [datasette/views/database.py](https://codecov.io/gh/simonw/datasette/pull/1931/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3ZpZXdzL2RhdGFiYXNlLnB5) | `95.83% <0.00%> (+17.01%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
/db/table/-/upsert 1473814539  
1341825314 https://github.com/simonw/datasette/pull/1931#issuecomment-1341825314 https://api.github.com/repos/simonw/datasette/issues/1931 IC_kwDOBm6k_c5P-qEi simonw 9599 2022-12-08T01:03:18Z 2022-12-08T01:03:18Z OWNER

I broke this test: ``` ds_write = <datasette.app.Datasette object at 0x7f0965858700>

@pytest.mark.asyncio
async def test_insert_row(ds_write):
    token = write_token(ds_write)
    response = await ds_write.client.post(
        "/data/docs/-/insert",
        json={"row": {"title": "Test", "score": 1.2, "age": 5}},
        headers={
            "Authorization": "***".format(token),
            "Content-Type": "application/json",
        },
    )
    expected_row = {"id": 1, "title": "Test", "score": 1.2, "age": 5}
  assert response.status_code == 201

E assert 500 == 201 E + where 500 = <Response [500 Internal Server Error]>.status_code

/home/runner/work/datasette/datasette/tests/test_api_write.py:43: AssertionError ----------------------------- Captured stderr call ----------------------------- Traceback (most recent call last): File "/home/runner/work/datasette/datasette/datasette/app.py", line 1447, in route_path response = await view(request, send) File "/home/runner/work/datasette/datasette/datasette/views/base.py", line 151, in view return await self.dispatch_request(request) File "/home/runner/work/datasette/datasette/datasette/views/base.py", line 105, in dispatch_request response = await handler(request) File "/home/runner/work/datasette/datasette/datasette/views/table.py", line 1228, in post row_pk_values_for_later = [tuple(row[pk] for pk in pks) for row in rows] File "/home/runner/work/datasette/datasette/datasette/views/table.py", line 1228, in <listcomp> row_pk_values_for_later = [tuple(row[pk] for pk in pks) for row in rows] File "/home/runner/work/datasette/datasette/datasette/views/table.py", line 1228, in <genexpr> row_pk_values_for_later = [tuple(row[pk] for pk in pks) for row in rows] KeyError: 'id' ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
/db/table/-/upsert 1473814539  
1341821213 https://github.com/simonw/datasette/pull/1931#issuecomment-1341821213 https://api.github.com/repos/simonw/datasette/issues/1931 IC_kwDOBm6k_c5P-pEd simonw 9599 2022-12-08T00:58:21Z 2022-12-08T00:58:21Z OWNER

In the interests of shipping, I'm going to punt the API explorer to a later issue.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
/db/table/-/upsert 1473814539  
1339968514 https://github.com/simonw/datasette/pull/1931#issuecomment-1339968514 https://api.github.com/repos/simonw/datasette/issues/1931 IC_kwDOBm6k_c5P3kwC simonw 9599 2022-12-06T20:28:47Z 2022-12-06T20:28:47Z OWNER

Should the "return": true mode reflect the order in which the rows were provided when the API was called?

I think it should. Since this is small enough to happily fit in Python memory (thanks to the max_insert_rows setting) I can load the fresh data from the database and then sort it in Python space before returning it.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
/db/table/-/upsert 1473814539  
1339916064 https://github.com/simonw/datasette/pull/1931#issuecomment-1339916064 https://api.github.com/repos/simonw/datasette/issues/1931 IC_kwDOBm6k_c5P3X8g davidbgk 3556 2022-12-06T19:42:45Z 2022-12-06T19:42:45Z CONTRIBUTOR

The "return": true option is really nice!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
/db/table/-/upsert 1473814539  
1339911152 https://github.com/simonw/datasette/pull/1931#issuecomment-1339911152 https://api.github.com/repos/simonw/datasette/issues/1931 IC_kwDOBm6k_c5P3Wvw simonw 9599 2022-12-06T19:38:12Z 2022-12-06T19:38:12Z OWNER

Documentation: https://datasette--1931.org.readthedocs.build/en/1931/json_api.html#upserting-rows

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
/db/table/-/upsert 1473814539  
1339784569 https://github.com/simonw/datasette/pull/1931#issuecomment-1339784569 https://api.github.com/repos/simonw/datasette/issues/1931 IC_kwDOBm6k_c5P2315 simonw 9599 2022-12-06T18:16:15Z 2022-12-06T18:17:56Z OWNER

Just noticed the insert API returns {} when it should return {"ok": true} - will fix that here too.

UPDATE: no it did that already, it was just the documentation that was wrong.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
/db/table/-/upsert 1473814539  
1339768422 https://github.com/simonw/datasette/pull/1931#issuecomment-1339768422 https://api.github.com/repos/simonw/datasette/issues/1931 IC_kwDOBm6k_c5P2z5m simonw 9599 2022-12-06T18:04:59Z 2022-12-06T18:04:59Z OWNER

I realized this API should require both the insert-row AND the update-row permissions, since calls to it could do either one.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
/db/table/-/upsert 1473814539  

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