-
Notifications
You must be signed in to change notification settings - Fork 302
More BackendCompatible generalizations #723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More BackendCompatible generalizations #723
Conversation
@@ -47,20 +47,20 @@ rawQueryRes sql vals = do | |||
stmtQuery stmt vals | |||
|
|||
-- | Execute a raw SQL statement | |||
rawExecute :: MonadIO m | |||
rawExecute :: (MonadIO m, BackendCompatible SqlBackend backend) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These functions needed to be generalized to satisfy Esqueleto.
@@ -27,6 +27,7 @@ import Control.Monad.Trans.Control (liftBaseOp_) | |||
import Database.Persist.Sql.Types | |||
import Database.Persist.Sql.Raw | |||
import Database.Persist.Types | |||
import Database.Persist.Sql.Orphan.PersistStore() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This import is necessary for the BackendCompatible SqlBackend SqlBackend
instance.
Compilation of
|
Good catch @dariooddenino The generalizations I'm making here make the preemptive |
@parsonsmatt This is looking good! Could you please rebase to the latest master, and make the changelog message describe the whole PR (include a link to the PR too) instead of saying it fixes a compilation error (which was just an intermediate step!)? Then, assuming travis is still OK, I can merge it. |
150c89b
to
f7afdea
Compare
Weird spurious build failure: https://travis-ci.org/yesodweb/persistent/jobs/296983378 Tests passed and all :\ |
Looked like a last-minute glitch. I restarted that test and it is fine now. Thanks for all of this - I'll go ahead and merge it. |
This reverts commit 7c00533.
This reverts commit 7c00533.
Revert "More BackendCompatible generalizations (#723)"
This PR includes some additional generalizations. Unfortunately, my work project does not use the
SqlReadT
orSqlWriteT
features, and it was only when the code was tested on those did the issues with Esqueleto come up.This PR generalizes
SqlReadT
so that Esqueleto can be updated in a way that doesn't cause any breaking changes.If any folks are using SqlReadT, I'd appreciate testing this PR/commit out with this Esqueleto PR to verify that it doesn't break any corner cases I've missed 😄