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/datasette/issues/1155#issuecomment-748356492 | https://api.github.com/repos/simonw/datasette/issues/1155 | 748356492 | MDEyOklzc3VlQ29tbWVudDc0ODM1NjQ5Mg== | 9599 | 2020-12-18T22:49:32Z | 2020-12-22T01:13:05Z | OWNER | There's some messy code that needs fixing here. The `datasette.databases` dictionary right now has a key that corresponds to the `/_internal` URL in the path, and a value that's a `Database()` object. BUT... the `Database()` object doesn't know what its key is. While fixing this I should fix the issue where Datasette gets confused by multiple databases with the same stem: https://github.com/simonw/datasette/issues/509 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
771216293 | |
https://github.com/simonw/datasette/issues/1155#issuecomment-748368660 | https://api.github.com/repos/simonw/datasette/issues/1155 | 748368660 | MDEyOklzc3VlQ29tbWVudDc0ODM2ODY2MA== | 9599 | 2020-12-18T23:18:04Z | 2020-12-19T01:12:00Z | OWNER | A `Database` should have a `.name` which is unique across the Datasette instance and is used in the URL. The `path` should be optional, only set for file databases. A new `.memory_name` property can be used for shared memory databases. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
771216293 | |
https://github.com/simonw/datasette/issues/1155#issuecomment-748368938 | https://api.github.com/repos/simonw/datasette/issues/1155 | 748368938 | MDEyOklzc3VlQ29tbWVudDc0ODM2ODkzOA== | 9599 | 2020-12-18T23:19:04Z | 2020-12-18T23:19:04Z | OWNER | `Database` internal class is documented here: https://docs.datasette.io/en/latest/internals.html#database-class | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
771216293 | |
https://github.com/simonw/datasette/issues/1155#issuecomment-748368384 | https://api.github.com/repos/simonw/datasette/issues/1155 | 748368384 | MDEyOklzc3VlQ29tbWVudDc0ODM2ODM4NA== | 9599 | 2020-12-18T23:17:00Z | 2020-12-18T23:17:00Z | OWNER | Here's the commit where I added it. https://github.com/simonw/datasette/commit/9743e1d91b5f0a2b3c1c0bd6ffce8739341f43c4 - I didn't yet have the `.add_database()` mechanism. Today the `MEMORY` object bit is no longer needed. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
771216293 | |
https://github.com/simonw/datasette/issues/1155#issuecomment-748367922 | https://api.github.com/repos/simonw/datasette/issues/1155 | 748367922 | MDEyOklzc3VlQ29tbWVudDc0ODM2NzkyMg== | 9599 | 2020-12-18T23:15:24Z | 2020-12-18T23:15:24Z | OWNER | The code for building up that `.databases` dictionary is a bit convoluted. Here's the code that adds a `:memory:` database if the user specified `--memory` OR if there are no files to be attached: https://github.com/simonw/datasette/blob/ebc7aa287c99fe6114b79aeab8efb8d4489a6182/datasette/app.py#L221-L241 I'm not sure why I wrote it this way, instead of just calling `.add_database(":memory:", Database(..., is_memory=True)`. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
771216293 |