github
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-1033366312 | https://api.github.com/repos/simonw/sqlite-utils/issues/402 | 1033366312 | IC_kwDOCGYnMM49l-so | 9599 | 2022-02-09T05:28:11Z | 2022-02-09T07:28:48Z | OWNER | My hunch is that the case where you want to consider input from more than one column will actually be pretty rare - the only case I can think of where I would want to do that is for latitude/longitude columns - everything else that I'd want to use it for (which admittedly is still mostly SpatiaLite stuff) works against a single value. The reason I'm leaning towards using the constructor for the values is that I really like the look of this variant for common conversions: ```python db["places"].insert( { "name": "London", "boundary": GeometryFromGeoJSON({...}) } ) ``` | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1125297737 | |
https://github.com/simonw/sqlite-utils/issues/402#issuecomment-1033428967 | https://api.github.com/repos/simonw/sqlite-utils/issues/402 | 1033428967 | IC_kwDOCGYnMM49mN_n | 9599 | 2022-02-09T07:25:44Z | 2022-02-09T07:28:11Z | OWNER | The CLI version of this could perhaps look like this: sqlite-utils insert a.db places places.json \ --conversion boundary GeometryGeoJSON This will treat the boundary key as GeoJSON. It's equivalent to passing `conversions={"boundary": geometryGeoJSON}` The combined latitude/longitude case here can be handled by combining this with the existing `--convert` mechanism. Any `Conversion` subclass will be available to the CLI in this way. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1125297737 | |
https://github.com/simonw/sqlite-utils/issues/405#issuecomment-1033425512 | https://api.github.com/repos/simonw/sqlite-utils/issues/405 | 1033425512 | IC_kwDOCGYnMM49mNJo | 9599 | 2022-02-09T07:20:11Z | 2022-02-09T07:20:11Z | OWNER | Datasette's implementation: https://github.com/simonw/datasette/blob/458f03ad3a454d271f47a643f4530bd8b60ddb76/datasette/database.py#L73-L79 ```python if self.memory_name: uri = "file:{}?mode=memory&cache=shared".format(self.memory_name) conn = sqlite3.connect( uri, uri=True, check_same_thread=False, ) ``` | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1128139375 | |
https://github.com/simonw/sqlite-utils/issues/405#issuecomment-1033424454 | https://api.github.com/repos/simonw/sqlite-utils/issues/405 | 1033424454 | IC_kwDOCGYnMM49mM5G | 9599 | 2022-02-09T07:18:25Z | 2022-02-09T07:18:25Z | OWNER | Writing tests against this is always a tiny bit fiddly since the created databases persist across the lifetime of the test run. Using randomly generated names helps. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1128139375 | |
https://github.com/simonw/sqlite-utils/issues/404#issuecomment-1033410970 | https://api.github.com/repos/simonw/sqlite-utils/issues/404 | 1033410970 | IC_kwDOCGYnMM49mJma | 9599 | 2022-02-09T06:56:35Z | 2022-02-09T06:56:35Z | OWNER | https://sqlite-utils.datasette.io/en/latest/cli-reference.html#insert | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1128120451 | |
https://github.com/simonw/sqlite-utils/issues/404#issuecomment-1033407778 | https://api.github.com/repos/simonw/sqlite-utils/issues/404 | 1033407778 | IC_kwDOCGYnMM49mI0i | 9599 | 2022-02-09T06:50:26Z | 2022-02-09T06:50:26Z | OWNER | I'll use this: ``` sqlite-utils insert plants.db plants plants.csv --csv --convert ' return { "name": row["name"].upper(), "latitude": float(row["latitude"]), "longitude": float(row["longitude"]), }' ``` | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1128120451 | |
https://github.com/simonw/datasette/issues/1607#issuecomment-1033403664 | https://api.github.com/repos/simonw/datasette/issues/1607 | 1033403664 | IC_kwDOBm6k_c49mH0Q | 9599 | 2022-02-09T06:42:02Z | 2022-02-09T06:42:02Z | OWNER | Deployed a new build of https://github.com/simonw/calands-datasette/actions/workflows/build-and-deploy.yml for a live demo: https://calands.datasettes.com/-/versions | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1109783030 |