home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 462430920

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association pull_request body repo type active_lock_reason performed_via_github_app reactions draft state_reason
462430920 MDU6SXNzdWU0NjI0MzA5MjA= 35 table.update(...) method 9599 closed 0     2 2019-06-30T18:06:15Z 2019-07-28T15:43:52Z 2019-07-28T15:43:52Z OWNER  

Spun off from #23 - this method will allow a user to update a specific row.

Currently the only way to do that it is to call .upsert({full record}) with the primary key field matching an existing record - but this does not support partial updates. python db["events"].update(3, {"name": "Renamed"}) This method only works on an existing table, so there's no need for a pk="id" specifier - it can detect the primary key by looking at the table.

If the primary key is compound the first argument can be a tuple: python db["events_venues"].update((3, 2), {"custom_label": "Label"}) The method can be called without the second dictionary argument. Doing this selects the row specified by the primary key (throwing an error if it does not exist) and remembers it so that chained operations can be carried out - see proposal in https://github.com/simonw/sqlite-utils/issues/23#issuecomment-507055345

140912432 issue    
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/issues/35/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed

Links from other tables

  • 1 row from issues_id in issues_labels
  • 2 rows from issue in issue_comments
Powered by Datasette · Queries took 0.981ms · About: github-to-sqlite