home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1012230212

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/79#issuecomment-1012230212 https://api.github.com/repos/simonw/sqlite-utils/issues/79 1012230212 IC_kwDOCGYnMM48VWhE 25778 2022-01-13T15:15:13Z 2022-01-13T15:15:13Z CONTRIBUTOR

Some proposals I'd add to sqlite-utils:

Some version of this, from geojson-to-sqlite:

python def init_spatialite(db, lib): db.conn.enable_load_extension(True) db.conn.load_extension(lib) # Initialize SpatiaLite if not yet initialized if "spatial_ref_sys" in db.table_names(): return db.conn.execute("select InitSpatialMetadata(1)")

Also a function for creating a spatial index:

python db.conn.execute("select CreateSpatialIndex(?, ?)", [table, "geometry"])

I don't know the nuances of updating a spatial index, or checking if one already exists. This could be a CLI method like:

sh sqlite-utils spatial-index spatial.db table-name column-name

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
557842245  
Powered by Datasette · Queries took 0.814ms · About: github-to-sqlite