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/1151#issuecomment-747784199 | https://api.github.com/repos/simonw/datasette/issues/1151 | 747784199 | MDEyOklzc3VlQ29tbWVudDc0Nzc4NDE5OQ== | 9599 | 2020-12-18T00:09:36Z | 2020-12-18T00:09:36Z | OWNER | Is it possible to connect to a memory database in read-only mode? `file:foo?mode=memory&cache=shared&mode=ro` isn't valid because it features `mode=` more than once. https://stackoverflow.com/a/40548682 suggests using `PRAGMA query_only` on the connection instead. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
770448622 | |
https://github.com/simonw/datasette/issues/1151#issuecomment-747801084 | https://api.github.com/repos/simonw/datasette/issues/1151 | 747801084 | MDEyOklzc3VlQ29tbWVudDc0NzgwMTA4NA== | 9599 | 2020-12-18T01:01:26Z | 2020-12-18T01:01:26Z | OWNER | I tested this with a one-off plugin and it worked! ```python from datasette import hookimpl from datasette.database import Database @hookimpl def startup(datasette): datasette.add_database("statistics", Database( datasette, memory_name="statistics" )) ``` This created a `/statistics` database when I ran `datasette` - and if I installed https://github.com/simonw/datasette-write I could then create tables in it which persisted until I restarted the server. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
770448622 | |
https://github.com/simonw/datasette/issues/1151#issuecomment-747801751 | https://api.github.com/repos/simonw/datasette/issues/1151 | 747801751 | MDEyOklzc3VlQ29tbWVudDc0NzgwMTc1MQ== | 9599 | 2020-12-18T01:03:39Z | 2020-12-18T01:03:39Z | OWNER | This feature is illustrated by the tests: https://github.com/simonw/datasette/blob/5e9895c67f08e9f42acedd3d6d29512ac446e15f/tests/test_internals_database.py#L469-L496 I added new documentation for the `Datasette()` constructor here as well: https://docs.datasette.io/en/latest/internals.html#database-ds-path-none-is-mutable-false-is-memory-false-memory-name-none | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
770448622 |