home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where issue = 1149661489 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

  • chapmanjacobd 2
  • simonw 1

author_association 2

  • CONTRIBUTOR 2
  • OWNER 1

issue 1

  • `with db:` for transactions · 3 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
1264223554 https://github.com/simonw/sqlite-utils/issues/409#issuecomment-1264223554 https://api.github.com/repos/simonw/sqlite-utils/issues/409 IC_kwDOCGYnMM5LWoVC chapmanjacobd 7908073 2022-10-01T03:42:50Z 2022-10-01T03:42:50Z CONTRIBUTOR

oh weird. it inserts into db2

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
`with db:` for transactions 1149661489  
1264223363 https://github.com/simonw/sqlite-utils/issues/409#issuecomment-1264223363 https://api.github.com/repos/simonw/sqlite-utils/issues/409 IC_kwDOCGYnMM5LWoSD chapmanjacobd 7908073 2022-10-01T03:41:45Z 2022-10-01T03:41:45Z CONTRIBUTOR

``` pytest xklb/check.py --pdb

xklb/check.py:11: in test_transaction assert list(db2["t"].rows) == [] E AssertionError: assert [{'foo': 1}] == [] E + where [{'foo': 1}] = list(<generator object Queryable.rows_where at 0x7f2d84d1f0d0>) E + where <generator object Queryable.rows_where at 0x7f2d84d1f0d0> = <Table t (foo)>.rows

entering PDB >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

PDB post_mortem (IO-capturing turned off) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> /home/xk/github/xk/lb/xklb/check.py(11)test_transaction() 9 with db1.conn: 10 db1["t"].insert({"foo": 1}) ---> 11 assert list(db2["t"].rows) == [] 12 assert list(db2["t"].rows) == [{"foo": 1}] ```

It fails because it is already inserted.

btw if you put these two lines in you pyproject.toml you can get ipdb in pytest

[tool.pytest.ini_options] addopts = "--pdbcls=IPython.terminal.debugger:TerminalPdb --ignore=tests/data --capture=tee-sys --log-cli-level=ERROR"

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
`with db:` for transactions 1149661489  
1055930639 https://github.com/simonw/sqlite-utils/issues/409#issuecomment-1055930639 https://api.github.com/repos/simonw/sqlite-utils/issues/409 IC_kwDOCGYnMM4-8DkP simonw 9599 2022-03-01T22:40:15Z 2022-03-01T22:40:15Z OWNER

This test fails and I don't understand why: ```python from sqlite_utils import Database

def test_transaction(): db1 = Database(memory_name="transaction_test", tracer=print) db2 = Database(memory_name="transaction_test", tracer=print) with db1.conn: db1["t"].insert({"foo": 1}) assert list(db2["t"].rows) == [] assert list(db2["t"].rows) == [{"foo": 1}] ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
`with db:` for transactions 1149661489  

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