home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

9 rows where "created_at" is on date 2022-09-28 and "updated_at" is on date 2022-09-28 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 5

  • simonw 4
  • fgregg 2
  • palfrey 1
  • codecov[bot] 1
  • pjamargh 1

issue 5

  • render_cell documentation example doesn't match the method signature 3
  • Refactor .csv to be an output renderer - and teach register_output_renderer to stream all rows 2
  • Add documentation for serving via OpenRC 2
  • Stream all results for arbitrary SQL and canned queries 1
  • Index page `/` has no CORS headers 1

author_association 3

  • OWNER 4
  • NONE 3
  • CONTRIBUTOR 2
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
1261194164 https://github.com/simonw/datasette/issues/1624#issuecomment-1261194164 https://api.github.com/repos/simonw/datasette/issues/1624 IC_kwDOBm6k_c5LLEu0 palfrey 38532 2022-09-28T16:54:22Z 2022-09-28T16:54:22Z NONE

https://github.com/simonw/datasette-cors seems to workaround this

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Index page `/` has no CORS headers 1122427321  
1260909128 https://github.com/simonw/datasette/issues/1062#issuecomment-1260909128 https://api.github.com/repos/simonw/datasette/issues/1062 IC_kwDOBm6k_c5LJ_JI fgregg 536941 2022-09-28T13:22:53Z 2022-09-28T14:09:54Z CONTRIBUTOR

if you went this route:

python with sqlite_timelimit(conn, time_limit_ms): c.execute(query) for chunk in c.fetchmany(chunk_size): yield from chunk

then time_limit_ms would probably have to be greatly extended, because the time spent in the loop will depend on the downstream processing.

i wonder if this was why you were thinking this feature would need a dedicated connection?


reading more, there's no real limit i can find on the number of active cursors (or more precisely active prepared statements objects, because sqlite doesn't really have cursors).

maybe something like this would be okay?

python with sqlite_timelimit(conn, time_limit_ms): c.execute(query) # step through at least one to evaluate the statement, not sure if this is necessary yield c.execute.fetchone() for chunk in c.fetchmany(chunk_size): yield from chunk

this seems quite weird that there's not more of limit of the number of active prepared statements, but i haven't been able to find one.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Refactor .csv to be an output renderer - and teach register_output_renderer to stream all rows 732674148  
1260829829 https://github.com/simonw/datasette/issues/1062#issuecomment-1260829829 https://api.github.com/repos/simonw/datasette/issues/1062 IC_kwDOBm6k_c5LJryF fgregg 536941 2022-09-28T12:27:19Z 2022-09-28T12:27:19Z CONTRIBUTOR

for teaching register_output_renderer to stream it seems like the two options are to

  1. a nested query technique to paginate through
  2. a fetching model that looks like something python with sqlite_timelimit(conn, time_limit_ms): c.execute(query) for chunk in c.fetchmany(chunk_size): yield from chunk currently db.execute is not a generator, so this would probably need a new method?
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Refactor .csv to be an output renderer - and teach register_output_renderer to stream all rows 732674148  
1260373403 https://github.com/simonw/datasette/issues/1826#issuecomment-1260373403 https://api.github.com/repos/simonw/datasette/issues/1826 IC_kwDOBm6k_c5LH8Wb pjamargh 66709385 2022-09-28T04:30:27Z 2022-09-28T04:30:27Z NONE

I'm glad the bug report served some purpose. Frankly I just needed the method signature, that is why the documentation you mention wasn't read.

On Tue, Sep 27, 2022, 9:05 PM Simon Willison @.***> wrote:

Though now I notice that the copy right there needs to be updated to reflect the new row parameter to render_cell!

— Reply to this email directly, view it on GitHub https://github.com/simonw/datasette/issues/1826#issuecomment-1260357878, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP46PCLI6KVDQTFLWVZODRLWAO72JANCNFSM6AAAAAAQXKWIJA . You are receiving this because you authored the thread.Message ID: @.***>

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
render_cell documentation example doesn't match the method signature 1388631785  
1260368537 https://github.com/simonw/datasette/pull/1825#issuecomment-1260368537 https://api.github.com/repos/simonw/datasette/issues/1825 IC_kwDOBm6k_c5LH7KZ simonw 9599 2022-09-28T04:21:18Z 2022-09-28T04:21:18Z OWNER

This is great, thank you very much!

https://datasette--1825.org.readthedocs.build/en/1825/deploying.html#running-datasette-using-openrc

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Add documentation for serving via OpenRC 1388227245  
1260368122 https://github.com/simonw/datasette/pull/1825#issuecomment-1260368122 https://api.github.com/repos/simonw/datasette/issues/1825 IC_kwDOBm6k_c5LH7D6 codecov[bot] 22429695 2022-09-28T04:20:28Z 2022-09-28T04:20:28Z NONE

Codecov Report

Base: 91.58% // Head: 91.58% // No change to project coverage :thumbsup:

Coverage data is based on head (b16eb2f) compared to base (5f9f567). Patch has no changes to coverable lines.

:exclamation: Current head b16eb2f differs from pull request most recent head e7e96dc. Consider uploading reports for the commit e7e96dc to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1825 +/- ## ======================================= Coverage 91.58% 91.58% ======================================= Files 36 36 Lines 4444 4444 ======================================= Hits 4070 4070 Misses 374 374 ``` 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
}
Add documentation for serving via OpenRC 1388227245  
1260357878 https://github.com/simonw/datasette/issues/1826#issuecomment-1260357878 https://api.github.com/repos/simonw/datasette/issues/1826 IC_kwDOBm6k_c5LH4j2 simonw 9599 2022-09-28T04:05:45Z 2022-09-28T04:05:45Z OWNER

Though now I notice that the copy right there needs to be updated to reflect the new row parameter to render_cell!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
render_cell documentation example doesn't match the method signature 1388631785  
1260357583 https://github.com/simonw/datasette/issues/1826#issuecomment-1260357583 https://api.github.com/repos/simonw/datasette/issues/1826 IC_kwDOBm6k_c5LH4fP simonw 9599 2022-09-28T04:05:16Z 2022-09-28T04:05:16Z OWNER

This is deliberate. The Datasette plugin system allows you to specify only a subset of the parameters for a hook - in this example, only the value is needed so the others can be omitted.

There's a note about this at the very top of that documentation page: https://docs.datasette.io/en/stable/plugin_hooks.html#plugin-hooks

When you implement a plugin hook you can accept any or all of the parameters that are documented as being passed to that hook.

For example, you can implement the render_cell plugin hook like this even though the full documented hook signature is render_cell(value, column, table, database, datasette): python @hookimpl def render_cell(value, column): if column == "stars": return "*" * int(value)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
render_cell documentation example doesn't match the method signature 1388631785  
1260355224 https://github.com/simonw/datasette/issues/526#issuecomment-1260355224 https://api.github.com/repos/simonw/datasette/issues/526 IC_kwDOBm6k_c5LH36Y simonw 9599 2022-09-28T04:01:25Z 2022-09-28T04:01:25Z OWNER

The ultimate protection against those memory bombs is to support more streaming output formats. Related issues:

  • 1177

  • 1062

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Stream all results for arbitrary SQL and canned queries 459882902  

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