home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

13 rows where "updated_at" is on date 2019-02-24 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)

issue 5

  • Improve and document foreign_keys=... argument to insert/create/etc 7
  • Utilities for adding indexes 3
  • Mechanism for adding foreign keys to an existing table 1
  • Error in upsert if column named 'order' 1
  • Ability to automatically create IDs from content hash of row 1

user 1

  • simonw 13

author_association 1

  • OWNER 13
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
466830869 https://github.com/simonw/sqlite-utils/issues/17#issuecomment-466830869 https://api.github.com/repos/simonw/sqlite-utils/issues/17 MDEyOklzc3VlQ29tbWVudDQ2NjgzMDg2OQ== simonw 9599 2019-02-24T23:45:48Z 2019-02-24T23:45:48Z OWNER

Both projects have been upgraded.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Improve and document foreign_keys=... argument to insert/create/etc 413868452  
466828503 https://github.com/simonw/sqlite-utils/issues/17#issuecomment-466828503 https://api.github.com/repos/simonw/sqlite-utils/issues/17 MDEyOklzc3VlQ29tbWVudDQ2NjgyODUwMw== simonw 9599 2019-02-24T23:15:26Z 2019-02-24T23:15:26Z OWNER

Released: https://sqlite-utils.readthedocs.io/en/latest/changelog.html#v0-14

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Improve and document foreign_keys=... argument to insert/create/etc 413868452  
466827533 https://github.com/simonw/sqlite-utils/issues/17#issuecomment-466827533 https://api.github.com/repos/simonw/sqlite-utils/issues/17 MDEyOklzc3VlQ29tbWVudDQ2NjgyNzUzMw== simonw 9599 2019-02-24T23:03:29Z 2019-02-24T23:03:29Z OWNER

Need to put out a new release of sqlite-utils so db-to-sqlite can depend on it.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Improve and document foreign_keys=... argument to insert/create/etc 413868452  
466823422 https://github.com/simonw/sqlite-utils/issues/17#issuecomment-466823422 https://api.github.com/repos/simonw/sqlite-utils/issues/17 MDEyOklzc3VlQ29tbWVudDQ2NjgyMzQyMg== simonw 9599 2019-02-24T22:20:05Z 2019-02-24T22:20:05Z OWNER

Re-opening this until I've fixed the other two projects.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Improve and document foreign_keys=... argument to insert/create/etc 413868452  
466821200 https://github.com/simonw/sqlite-utils/issues/17#issuecomment-466821200 https://api.github.com/repos/simonw/sqlite-utils/issues/17 MDEyOklzc3VlQ29tbWVudDQ2NjgyMTIwMA== simonw 9599 2019-02-24T21:55:08Z 2019-02-24T21:55:54Z OWNER

This involves a breaking API change. I need to call that out in the README and also fix my two other projects which use the old four-tuple version of foreign_keys=:

https://github.com/simonw/db-to-sqlite/blob/c2f8e93bc6bbdfd135de3656ea0f497859ae49ff/db_to_sqlite/cli.py#L30-L42

And

https://github.com/simonw/russian-ira-facebook-ads-datasette/blob/e7106710abdd7bdcae035bedd8bdaba75ae56a12/fetch_and_build_russian_ads.py#L71-L74

I'll also need to set a minimum version for sqlite-utils in the db-to-sqlite setup.py:

https://github.com/simonw/db-to-sqlite/blob/c2f8e93bc6bbdfd135de3656ea0f497859ae49ff/setup.py#L25

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Improve and document foreign_keys=... argument to insert/create/etc 413868452  
466820188 https://github.com/simonw/sqlite-utils/issues/17#issuecomment-466820188 https://api.github.com/repos/simonw/sqlite-utils/issues/17 MDEyOklzc3VlQ29tbWVudDQ2NjgyMDE4OA== simonw 9599 2019-02-24T21:42:50Z 2019-02-24T21:42:50Z OWNER

Sanity checking those foreign keys would be worthwhile.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Improve and document foreign_keys=... argument to insert/create/etc 413868452  
466820167 https://github.com/simonw/sqlite-utils/issues/17#issuecomment-466820167 https://api.github.com/repos/simonw/sqlite-utils/issues/17 MDEyOklzc3VlQ29tbWVudDQ2NjgyMDE2Nw== simonw 9599 2019-02-24T21:42:33Z 2019-02-24T21:42:33Z OWNER

It looks like the type information isn't actually used for anything at all, so this:

https://github.com/simonw/sqlite-utils/blob/f8d3b7cfe5c1950b0749d40eb2640df50b52f651/tests/test_create.py#L97-L103

Could actually be written like this:

fresh_db["m2m"].insert( {"one_id": 1, "two_id": 1}, foreign_keys=( ("one_id", "one", "id"), ("two_id", "two", "id"), ), )

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Improve and document foreign_keys=... argument to insert/create/etc 413868452  
466807308 https://github.com/simonw/sqlite-utils/issues/2#issuecomment-466807308 https://api.github.com/repos/simonw/sqlite-utils/issues/2 MDEyOklzc3VlQ29tbWVudDQ2NjgwNzMwOA== simonw 9599 2019-02-24T19:18:19Z 2019-02-24T19:18:25Z OWNER

Python API:

db["articles"].add_foreign_key("author_id", "authors", "id")

CLI:

$ sqlite-utils add-foreign-key articles author_id authors id
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for adding foreign keys to an existing table 349850687  
466800210 https://github.com/simonw/sqlite-utils/issues/14#issuecomment-466800210 https://api.github.com/repos/simonw/sqlite-utils/issues/14 MDEyOklzc3VlQ29tbWVudDQ2NjgwMDIxMA== simonw 9599 2019-02-24T18:02:23Z 2019-02-24T18:02:23Z OWNER

Likewise I'm going to ignore indexes on expressions (as opposed to just columns): https://www.sqlite.org/expridx.html

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Utilities for adding indexes 413842611  
466800090 https://github.com/simonw/sqlite-utils/issues/14#issuecomment-466800090 https://api.github.com/repos/simonw/sqlite-utils/issues/14 MDEyOklzc3VlQ29tbWVudDQ2NjgwMDA5MA== simonw 9599 2019-02-24T18:01:10Z 2019-02-24T18:01:10Z OWNER

The WHERE clause can be used to create partial indexes: https://www.sqlite.org/partialindex.html

I'm going to ignore it for the moment.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Utilities for adding indexes 413842611  
466794369 https://github.com/simonw/sqlite-utils/issues/14#issuecomment-466794369 https://api.github.com/repos/simonw/sqlite-utils/issues/14 MDEyOklzc3VlQ29tbWVudDQ2Njc5NDM2OQ== simonw 9599 2019-02-24T16:59:11Z 2019-02-24T16:59:43Z OWNER

https://www.sqlite.org/lang_createindex.html

May as well support --if-not-exists as well.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Utilities for adding indexes 413842611  
466794069 https://github.com/simonw/sqlite-utils/issues/10#issuecomment-466794069 https://api.github.com/repos/simonw/sqlite-utils/issues/10 MDEyOklzc3VlQ29tbWVudDQ2Njc5NDA2OQ== simonw 9599 2019-02-24T16:55:37Z 2019-02-24T16:55:37Z OWNER

This was fixed by https://github.com/simonw/sqlite-utils/commit/228d595f7d10994f34e948888093c2cd290267c4 - see also #8 ```

db = sqlite_utils.Database(":memory:") dfX=pd.DataFrame({'order':range(3),'col2':range(3)}) db["test"].upsert_all(dfX.to_dict(orient='records'))

<Table test> ```
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Error in upsert if column named 'order' 411066700  
466732039 https://github.com/simonw/sqlite-utils/issues/13#issuecomment-466732039 https://api.github.com/repos/simonw/sqlite-utils/issues/13 MDEyOklzc3VlQ29tbWVudDQ2NjczMjAzOQ== simonw 9599 2019-02-24T04:07:57Z 2019-02-24T04:07:57Z OWNER

Example: http://api.nobelprize.org/v1/laureate.json

This includes affiliations which look like this:

      "affiliations": [
        {
          "name": "Sorbonne University",
          "city": "Paris",
          "country": "France"
        }
      ]
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Ability to automatically create IDs from content hash of row 413779210  

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