home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

11 rows where "updated_at" is on date 2022-02-09 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: issue_url, reactions, created_at (date), updated_at (date)

issue 8

  • Advanced class-based `conversions=` mechanism 2
  • Add example of `--convert` to the help for `sqlite-utils insert` 2
  • `Database(memory_name="name")` constructor argument 2
  • datasette publish lambda plugin 1
  • changes to allow for compound foreign keys 1
  • More detailed information about installed SpatiaLite version 1
  • Document how to add a primary key to a rowid table using `sqlite-utils transform --pk` 1
  • base_url or prefix does not work with _exact match 1

user 5

  • simonw 7
  • psychemedia 1
  • fgregg 1
  • jordaneremieff 1
  • henrikek 1

author_association 3

  • OWNER 7
  • NONE 3
  • CONTRIBUTOR 1
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
1034222709 https://github.com/simonw/datasette/issues/1633#issuecomment-1034222709 https://api.github.com/repos/simonw/datasette/issues/1633 IC_kwDOBm6k_c49pPx1 henrikek 6613091 2022-02-09T21:47:02Z 2022-02-09T21:47:02Z NONE

Is this the correct solution to add the base_url row to url_builder.py?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
base_url or prefix does not work with _exact match 1129052172  
1033772902 https://github.com/simonw/datasette/issues/236#issuecomment-1033772902 https://api.github.com/repos/simonw/datasette/issues/236 IC_kwDOBm6k_c49nh9m jordaneremieff 1376648 2022-02-09T13:40:52Z 2022-02-09T13:40:52Z NONE

Hi @simonw,

I've received some inquiries over the last year or so about Datasette and how it might be supported by Mangum. I maintain Mangum which is, as far as I know, the only project that provides support for ASGI applications in AWS Lambda.

If there is anything that I can help with here, please let me know because I think what Datasette provides to the community (even beyond OSS) is noble and worthy of special consideration.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
datasette publish lambda plugin 317001500  
1033641009 https://github.com/simonw/sqlite-utils/pull/203#issuecomment-1033641009 https://api.github.com/repos/simonw/sqlite-utils/issues/203 IC_kwDOCGYnMM49nBwx psychemedia 82988 2022-02-09T11:06:18Z 2022-02-09T11:06:18Z NONE

Is there any progress elsewhere on the handling of compound / composite foreign keys, or is this PR still effectively open?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
changes to allow for compound foreign keys 743384829  
1033366312 https://github.com/simonw/sqlite-utils/issues/402#issuecomment-1033366312 https://api.github.com/repos/simonw/sqlite-utils/issues/402 IC_kwDOCGYnMM49l-so simonw 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
}
Advanced class-based `conversions=` mechanism 1125297737  
1033428967 https://github.com/simonw/sqlite-utils/issues/402#issuecomment-1033428967 https://api.github.com/repos/simonw/sqlite-utils/issues/402 IC_kwDOCGYnMM49mN_n simonw 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
}
Advanced class-based `conversions=` mechanism 1125297737  
1033425512 https://github.com/simonw/sqlite-utils/issues/405#issuecomment-1033425512 https://api.github.com/repos/simonw/sqlite-utils/issues/405 IC_kwDOCGYnMM49mNJo simonw 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
}
`Database(memory_name="name")` constructor argument 1128139375  
1033424454 https://github.com/simonw/sqlite-utils/issues/405#issuecomment-1033424454 https://api.github.com/repos/simonw/sqlite-utils/issues/405 IC_kwDOCGYnMM49mM5G simonw 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
}
`Database(memory_name="name")` constructor argument 1128139375  
1033410970 https://github.com/simonw/sqlite-utils/issues/404#issuecomment-1033410970 https://api.github.com/repos/simonw/sqlite-utils/issues/404 IC_kwDOCGYnMM49mJma simonw 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
}
Add example of `--convert` to the help for `sqlite-utils insert` 1128120451  
1033407778 https://github.com/simonw/sqlite-utils/issues/404#issuecomment-1033407778 https://api.github.com/repos/simonw/sqlite-utils/issues/404 IC_kwDOCGYnMM49mI0i simonw 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
}
Add example of `--convert` to the help for `sqlite-utils insert` 1128120451  
1033403664 https://github.com/simonw/datasette/issues/1607#issuecomment-1033403664 https://api.github.com/repos/simonw/datasette/issues/1607 IC_kwDOBm6k_c49mH0Q simonw 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
}
More detailed information about installed SpatiaLite version 1109783030  
1033332570 https://github.com/simonw/sqlite-utils/issues/403#issuecomment-1033332570 https://api.github.com/repos/simonw/sqlite-utils/issues/403 IC_kwDOCGYnMM49l2da fgregg 536941 2022-02-09T04:22:43Z 2022-02-09T04:22:43Z CONTRIBUTOR

dddoooope

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Document how to add a primary key to a rowid table using `sqlite-utils transform --pk` 1126692066  

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 550.441ms · About: github-to-sqlite