Deprecate rand, EOrderRandom

This commit is contained in:
Chris Allen 2018-02-27 18:32:10 -06:00
parent 391aa86464
commit 632f4408df
2 changed files with 3 additions and 0 deletions

View File

@ -591,6 +591,8 @@ class (Functor query, Applicative query, Monad query) =>
{-# DEPRECATED random_ "Since 2.6.0: `random_` is not uniform across all databases! Please use a specific one such as 'Database.Esqueleto.PostgreSQL.random_', 'Database.Esqueleto.MySQL.random_', or 'Database.Esqueleto.SQLite.random_'" #-}
{-# DEPRECATED rand "Since 2.6.0: `rand` ordering function is not uniform across all databases! To avoid accidental partiality it will be removed in the next major version." #-}
-- Fixity declarations
infixl 9 ^.
infixl 7 *., /.

View File

@ -1159,6 +1159,7 @@ makeOrderBy info os = first ("\nORDER BY " <>) . uncommas' $ concatMap mk os
orderByType ASC = " ASC"
orderByType DESC = " DESC"
{-# DEPRECATED EOrderRandom "Since 2.6.0: `rand` ordering function is not uniform across all databases! To avoid accidental partiality it will be removed in the next major version." #-}
makeLimit :: IdentInfo -> LimitClause -> [OrderByClause] -> (TLB.Builder, [PersistValue])
makeLimit (conn, _) (Limit ml mo) orderByClauses =