home / github / issue_comments

Menu
  • GraphQL API

issue_comments: 1040978032

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/406#issuecomment-1040978032 https://api.github.com/repos/simonw/sqlite-utils/issues/406 1040978032 IC_kwDOCGYnMM4-DBBw 9599 2022-02-16T01:10:31Z 2022-02-16T01:10:31Z OWNER Allowing custom strings in the `create()` method, as you suggest in your example, feels like a reasonable way to support this. ```python db["dummy"].create({ "title": str, "vector": "array", }) ``` I'm slightly nervous about that just because people might accidentally use this without realizig what they are doing - passing `"column-name": "string"` for example when they should have used `"column-name": str` in order to get a `TEXT` column. Alternatively, this could work: ```python db["dummy"].create({ "title": str, "vector": CustomColumnType("array") }) ``` This would play better with `mypy` too I think. {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 1128466114  
Powered by Datasette · Queries took 2.254ms