home / github

Menu
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where issue = 1128466114

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: user, author_association, created_at (date), updated_at (date)

id ▼ html_url issue_url node_id user created_at updated_at author_association body reactions issue performed_via_github_app
1040974519 https://github.com/simonw/sqlite-utils/issues/406#issuecomment-1040974519 https://api.github.com/repos/simonw/sqlite-utils/issues/406 IC_kwDOCGYnMM4-DAK3 simonw 9599 2022-02-16T01:08:17Z 2022-02-16T01:08:17Z OWNER I had no idea this was possible! I guess SQLite will allow any text string as the column type, defaulting to `TEXT` as the underlying default representation if it doesn't recognize the type. {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} Creating tables with custom datatypes 1128466114  
1040978032 https://github.com/simonw/sqlite-utils/issues/406#issuecomment-1040978032 https://api.github.com/repos/simonw/sqlite-utils/issues/406 IC_kwDOCGYnMM4-DBBw simonw 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} Creating tables with custom datatypes 1128466114  
1041313679 https://github.com/simonw/sqlite-utils/issues/406#issuecomment-1041313679 https://api.github.com/repos/simonw/sqlite-utils/issues/406 IC_kwDOCGYnMM4-ES-P psychemedia 82988 2022-02-16T09:59:51Z 2022-02-16T10:00:10Z NONE The `CustomColumnType()` approach looks good. This pushes you into the mindspace that you are defining and working with a custom column type. When creating the table, you could then error, or at least warn, if someone wasn't setting a column on a `type` or a custom column type, which I guess is where `mypy` comes in? {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} Creating tables with custom datatypes 1128466114  
1041363433 https://github.com/simonw/sqlite-utils/issues/406#issuecomment-1041363433 https://api.github.com/repos/simonw/sqlite-utils/issues/406 IC_kwDOCGYnMM4-EfHp psychemedia 82988 2022-02-16T10:57:03Z 2022-02-16T10:57:19Z NONE Wondering if this actually relates to https://github.com/simonw/sqlite-utils/issues/402 ? I also wonder if this would be a sensible approach for eg registering `pint` based quantity conversions into and out of the db, perhaps storing the quantity as a serialised `magnitude measurement` single column string? {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} Creating tables with custom datatypes 1128466114  
1248440137 https://github.com/simonw/sqlite-utils/issues/406#issuecomment-1248440137 https://api.github.com/repos/simonw/sqlite-utils/issues/406 IC_kwDOCGYnMM5Kaa9J psychemedia 82988 2022-09-15T18:13:50Z 2022-09-15T18:13:50Z NONE I was wondering if you have any more thoughts on this? I have a tangible use case now: adding a "vector" column to a database to support semantic search using doc2vec embeddings ([example](https://psychemedia.github.io/storynotes/Lang_Doc2Vec.html); note that the `vtfunc` package may no longer be reliable...). {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} Creating tables with custom datatypes 1128466114  

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
, [performed_via_github_app] TEXT);
CREATE INDEX [idx_issue_comments_issue]
                ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
                ON [issue_comments] ([user]);
Powered by Datasette · Queries took 105.13ms · About: simonw/datasette-graphql