databrary-1: Databrary
Model.SQL
selectQuery :: Selector -> String -> ExpQ Source #
isUniqueViolation :: PGError -> Bool Source #
isExclusionViolation :: PGError -> Bool Source #
isForeignKeyViolation :: PGError -> Bool Source #
tryUpdateOrInsert :: (MonadDB c m, PGQuery q a) => (PGError -> Maybe e) -> q -> q -> m (Either e (Int, [a])) Source #
updateOrInsert :: (MonadDB c m, PGQuery q a) => q -> q -> m (Int, [a]) Source #