Polymorphic backend version for withPostgresqlPool and co
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
Direzione di ricerca
Start by locating withPostgresqlPool and related APIs in the persistent-postgresql package, then read the Pool SqlBackend type and how SqlReadBackend is defined and used. Determine whether the API can expose a suitably constrained polymorphic backend while preserving existing callers; done means the interface provides the requested read-only instantiation and relevant package checks pass.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
persistent-postgresql currently exposes an interface which only provides Pool SqlBackend. However, this makes it so that we cannot guarantee that callers inside will perform no write operations. If the interface could instead be changed to provide a polymorphic backend with proper constraints, we could then potentially instantiate to SqlReadBackend and have some slightly stronger guarantees about what kinds of operations are happening inside.
Is there some reason to not do that?
EDIT: I just realised I can just coerce the pool to get what I want, but I think providing the nicer interface out of the box would still be more convenient (and potentially easier to grasp for newcomers)
- Lingua principale
- Haskell
- Stelle
- 486
- Fork
- 307
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di yesodweb/persistent
-
use aeson >= 2.3.0.0 to avoid HSEC-2026-0007Forse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
yesodweb/persistent#1635 · 1 commento · 1 reazione ·
-
Typos in Documentation for Database.Persist.QuasiForse già presa @000wahab000 l’ha presa 62 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
yesodweb/persistent#1634 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 70/100
yesodweb/persistent#1642 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
yesodweb/persistent#1641 ·
-
Regression since bumping resource-pool from `0.4.0.0` to `0.5.x`Forse già presa @swamp-agr l’ha presa 72 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
yesodweb/persistent#1636 ·
Tutte le issue di yesodweb/persistent
Issue simili
-
docs
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement triage
Difficoltà 1/5 1-3 ore Idoneità per principianti 66/100
simplex-chat/simplex-chat#8043 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
haskell-servant/servant#1929 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
fmidue/haskell-template-task#77 · 2 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
haskell/network-uri#92 ·