home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1030901853

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions issue performed_via_github_app
https://github.com/simonw/sqlite-utils/issues/402#issuecomment-1030901853 https://api.github.com/repos/simonw/sqlite-utils/issues/402 1030901853 IC_kwDOCGYnMM49clBd 9599 2022-02-06T19:52:10Z 2022-02-06T19:52:10Z OWNER

So the key idea here is to introduce a new abstract base class, Conversion, which has the following abilities:

  • Can wrap one or more Python values (if called using the constructor) such that the .insert_all() method knows how to transform those into a format that can be included in an insert - something like GeomFromText(?, 4326) with input POINT(-0.118092 51.509865)
  • Can be passed to conversions={"point": LongitudeLatitude} in a way that then knows to apply that conversion to every value in the "point" key of the data being inserted.
  • Maybe also extend conversions= to allow the definition of additional keys that use as input other rows? That's the conversions={"point": LongitudeLatitude("lng", "lat")} example above - it may not be possible to get this working with the rest of the design though.
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
1125297737  
Powered by Datasette · Queries took 1.037ms · About: github-to-sqlite