Title: proposal: use SQLite instead of in-memory database · Issue #881 · coder/coder · GitHub
Open Graph Title: proposal: use SQLite instead of in-memory database · Issue #881 · coder/coder
X Title: proposal: use SQLite instead of in-memory database · Issue #881 · coder/coder
Description: Instead of writing two DB implementations, we could have an SQLite implementation auto-generated from the exact same sqlc files. Any queries that don't work in SQLite can be specifically overridden, but I suspect this list will be small....
Open Graph Description: Instead of writing two DB implementations, we could have an SQLite implementation auto-generated from the exact same sqlc files. Any queries that don't work in SQLite can be specifically overridden...
X Description: Instead of writing two DB implementations, we could have an SQLite implementation auto-generated from the exact same sqlc files. Any queries that don't work in SQLite can be specifically overri...
Opengraph URL: https://github.com/coder/coder/issues/881
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"proposal: use SQLite instead of in-memory database","articleBody":"Instead of writing two DB implementations, we could have an SQLite implementation auto-generated from the exact same sqlc files. Any queries that don't work in SQLite can be specifically overridden, but I suspect this list will be small.\r\n\r\n### Pros:\r\n- We don't have to maintain our own flawed in-memory implementation with maps and mutexes\r\n - Transaction support\r\n - Enforced primary keys and constraints\r\n - Foreign keys\r\n - Basically full relational stuff\r\n\r\n### Cons:\r\n- Doesn't support the full range of Postgres features\r\n - No advisory locks (but these can be replaced with a Go implementation similar to `map[string]sync.Mutex`)\r\n - Some crazy queries with complex joins/aggregations and some complex types might not be supported (we can replace these queries specifically for the SQLite implementation)\r\n- Cgo is probably required 😢\r\n\r\nCgo is probably a dealbreaker but I decided to post this ticket anyways to get the discussion going\r\n\r\ncc @kylecarbs ","author":{"url":"https://github.com/deansheather","@type":"Person","name":"deansheather"},"datePublished":"2022-04-05T23:08:51Z","url":"https://github.com/coder/coder/issues/881"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:28c6cadf-7241-90ea-697e-622cb0f9fd33 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 80E2:1201C:26F14FD:33BE98C:6B01A340 |
| html-safe-nonce | 5ebd6c1dd49b86309095af369497822a17579159997a7c2be94bab14b008627c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MEUyOjEyMDFDOjI2RjE0RkQ6MzNCRTk4Qzo2QjAxQTM0MCIsInZpc2l0b3JfaWQiOiI1NjIyMTg1MDUyMDg0NDc4Nzg0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c9d4b599ea4c4b9fc11c5c926457600d36fd484c10770740c831582521c4ad73 |
| hovercard-subject-tag | issue:1193825777 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/coder/881/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fe1b5baf4fa27bffe71b3d06911ebeb21b4434a1359d15d3432bb4df5b1ab849/coder/coder/issues/881 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fe1b5baf4fa27bffe71b3d06911ebeb21b4434a1359d15d3432bb4df5b1ab849/coder/coder/issues/881 |
| og:image:alt | Instead of writing two DB implementations, we could have an SQLite implementation auto-generated from the exact same sqlc files. Any queries that don't work in SQLite can be specifically overridden... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | deansheather |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/coder/coder git https://github.com/coder/coder.git |
| octolytics-dimension-user_id | 95932066 |
| octolytics-dimension-user_login | coder |
| octolytics-dimension-repository_id | 440752086 |
| octolytics-dimension-repository_nwo | coder/coder |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 440752086 |
| octolytics-dimension-repository_network_root_nwo | coder/coder |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width