fix build on 8.4 and 8.2
This commit is contained in:
parent
ced45b0c4e
commit
5ff34fc8f8
@ -33,7 +33,7 @@ import Database.Esqueleto.Internal.Language hiding (random_)
|
|||||||
import Database.Esqueleto.Internal.PersistentImport hiding (upsert, upsertBy)
|
import Database.Esqueleto.Internal.PersistentImport hiding (upsert, upsertBy)
|
||||||
import Database.Esqueleto.Internal.Sql
|
import Database.Esqueleto.Internal.Sql
|
||||||
import Database.Esqueleto.Internal.Internal (EsqueletoError(..), CompositeKeyError(..),
|
import Database.Esqueleto.Internal.Internal (EsqueletoError(..), CompositeKeyError(..),
|
||||||
UnexpectedCaseError(..))
|
UnexpectedCaseError(..), SetClause)
|
||||||
import Database.Persist.Class (OnlyOneUniqueKey)
|
import Database.Persist.Class (OnlyOneUniqueKey)
|
||||||
import Data.List.NonEmpty ( NonEmpty( (:|) ) )
|
import Data.List.NonEmpty ( NonEmpty( (:|) ) )
|
||||||
import Control.Arrow ((***), first)
|
import Control.Arrow ((***), first)
|
||||||
@ -208,7 +208,9 @@ upsertBy uniqueKey record updates = do
|
|||||||
-> (TLB.Builder, [PersistValue])
|
-> (TLB.Builder, [PersistValue])
|
||||||
renderUpdates conn = uncommas' . concatMap renderUpdate
|
renderUpdates conn = uncommas' . concatMap renderUpdate
|
||||||
where
|
where
|
||||||
|
mk :: SqlExpr (Value ()) -> [(TLB.Builder, [PersistValue])]
|
||||||
mk (ERaw _ f) = [f info]
|
mk (ERaw _ f) = [f info]
|
||||||
mk (ECompositeKey _) = throw (CompositeKeyErr MakeSetError) -- FIXME
|
mk (ECompositeKey _) = throw (CompositeKeyErr MakeSetError) -- FIXME
|
||||||
|
renderUpdate :: SqlExpr (Update val) -> [(TLB.Builder, [PersistValue])]
|
||||||
renderUpdate (ESet f) = mk (f undefined) -- second parameter of f is always unused
|
renderUpdate (ESet f) = mk (f undefined) -- second parameter of f is always unused
|
||||||
info = (projectBackend conn, initialIdentState)
|
info = (projectBackend conn, initialIdentState)
|
||||||
Loading…
Reference in New Issue
Block a user