home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

6 rows where author_association = "OWNER", issue = 1058072543 and "updated_at" is on date 2021-12-12 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 1

  • simonw 6

issue 1

  • Complete refactor of TableView and table.html template · 6 ✖

author_association 1

  • OWNER · 6 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
991978789 https://github.com/simonw/datasette/issues/1518#issuecomment-991978789 https://api.github.com/repos/simonw/datasette/issues/1518 IC_kwDOBm6k_c47IGUl simonw 9599 2021-12-12T22:04:19Z 2021-12-12T22:04:19Z OWNER

Idea: in JSON output include a warnings block listing any _ parameters that were not recognized.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Complete refactor of TableView and table.html template 1058072543  
991828014 https://github.com/simonw/datasette/issues/1518#issuecomment-991828014 https://api.github.com/repos/simonw/datasette/issues/1518 IC_kwDOBm6k_c47Hhgu simonw 9599 2021-12-12T03:21:35Z 2021-12-12T03:21:35Z OWNER

No, removing that gave me the following test failure: ``` tests/test_table_api.py::test_table_filter_queries[/fixtures/simple_primary_key.json?content__exact=-expected_rows2] FAILED [100%]

=============================================================================== FAILURES ================================================================================ _____ testtable_filter_queries[/fixtures/simple_primary_key.json?contentexact=-expected_rows2] ________

app_client = <datasette.utils.testing.TestClient object at 0x10d45d2d0>, path = '/fixtures/simple_primary_key.json?content__exact=', expected_rows = [['3', '']]

@pytest.mark.parametrize(
    "path,expected_rows",
    [
        ("/fixtures/simple_primary_key.json?content=hello", [["1", "hello"]]),
        (
            "/fixtures/simple_primary_key.json?content__contains=o",
            [
                ["1", "hello"],
                ["2", "world"],
                ["4", "RENDER_CELL_DEMO"],
            ],
        ),
        ("/fixtures/simple_primary_key.json?content__exact=", [["3", ""]]),
        (
            "/fixtures/simple_primary_key.json?content__not=world",
            [
                ["1", "hello"],
                ["3", ""],
                ["4", "RENDER_CELL_DEMO"],
                ["5", "RENDER_CELL_ASYNC"],
            ],
        ),
    ],
)
def test_table_filter_queries(app_client, path, expected_rows):
    response = app_client.get(path)
  assert expected_rows == response.json["rows"]

E AssertionError: assert [['3', '']] == [['1', 'hello'],\n ['2', 'world'],\n ['3', ''],\n ['4', 'RENDER_CELL_DEMO'],\n ['5', 'RENDER_CELL_ASYNC']] E At index 0 diff: ['3', ''] != ['1', 'hello'] E Right contains 4 more items, first extra item: ['2', 'world'] E Full diff: E [ E - ['1', E - 'hello'], E - ['2', E - 'world'], E ['3', E ''], E - ['4', E - 'RENDER_CELL_DEMO'], E - ['5', E - 'RENDER_CELL_ASYNC'], E ]

/Users/simon/Dropbox/Development/datasette/tests/test_table_api.py:511: AssertionError ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Complete refactor of TableView and table.html template 1058072543  
991827468 https://github.com/simonw/datasette/issues/1518#issuecomment-991827468 https://api.github.com/repos/simonw/datasette/issues/1518 IC_kwDOBm6k_c47HhYM simonw 9599 2021-12-12T03:15:00Z 2021-12-12T03:15:00Z OWNER

I don't think this code is necessary any more: https://github.com/simonw/datasette/blob/492f9835aa7e90540dd0c6324282b109f73df71b/datasette/views/table.py#L396-L399

That dates back from when Datasette was built on top of Sanic and Sanic didn't preserve those query parameters the way I needed it to:

https://github.com/simonw/datasette/blob/1f69269fe93e4cd42e56890126cc0dbcf719c6cb/datasette/views/table.py#L202-L206

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Complete refactor of TableView and table.html template 1058072543  
991823001 https://github.com/simonw/datasette/issues/1518#issuecomment-991823001 https://api.github.com/repos/simonw/datasette/issues/1518 IC_kwDOBm6k_c47HgSZ simonw 9599 2021-12-12T02:25:32Z 2021-12-12T02:25:32Z OWNER

The tests for TableView are currently mixed in with everything else in tests/test_api.py and tests/html.py - might be good to split those out into test_table_html.py and test_table_api.py since they're such a key part of how Datasette works.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Complete refactor of TableView and table.html template 1058072543  
991822853 https://github.com/simonw/datasette/issues/1518#issuecomment-991822853 https://api.github.com/repos/simonw/datasette/issues/1518 IC_kwDOBm6k_c47HgQF simonw 9599 2021-12-12T02:24:00Z 2021-12-12T02:24:00Z OWNER

Rebuilding TableView from the ground up is proving not to be much fun. I'm going to explore starting the refactor of the existing code by separating out the bit that generates the SQL query from the rest of it.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Complete refactor of TableView and table.html template 1058072543  
991819781 https://github.com/simonw/datasette/issues/1518#issuecomment-991819781 https://api.github.com/repos/simonw/datasette/issues/1518 IC_kwDOBm6k_c47HfgF simonw 9599 2021-12-12T01:53:10Z 2021-12-12T01:53:10Z OWNER

I have a hunch that the conclusion of this experiment may end up being that the asyncinject trick is kinda neat but the code will be easier to maintain (while still executing in parallel) if it's written using asyncio.gather directly instead.

It's possible asyncinject will end up being neat enough that I'll want to keep it though.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Complete refactor of TableView and table.html template 1058072543  

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 44.85ms · About: github-to-sqlite