opaleye-0.3.1: An SQL-generating DSL targeting PostgreSQL

Safe HaskellNone
LanguageHaskell98

Opaleye.Order

Synopsis

Documentation

orderBy :: Order a -> Query a -> Query a Source

Order the rows of a Query according to the Order.

asc :: (a -> Column b) -> Order a Source

Specify an ascending ordering by the given expression.

desc :: (a -> Column b) -> Order a Source

Specify an descending ordering by the given expression.

limit :: Int -> Query a -> Query a Source

Limit the results of the given query to the given maximum number of items.

offset :: Int -> Query a -> Query a Source

Offset the results of the given query by the given amount, skipping that many result rows.

data Order a Source

An Order represents an expression to order on and a sort direction. Multiple Orders can be composed with mappend. If two rows are equal according to the first Order, the second is used, and so on.