mirror of
https://github.com/nikita-volkov/hasql.git
synced 2024-12-28 13:02:31 +03:00
21 lines
338 B
Haskell
21 lines
338 B
Haskell
module Main.Queries where
|
|
|
|
import Rebase.Prelude
|
|
import Hasql.Query
|
|
import qualified Hasql.Encoders as E
|
|
import qualified Hasql.Decoders as D
|
|
|
|
|
|
selectSleep :: Query Double ()
|
|
selectSleep =
|
|
statement sql encoder decoder True
|
|
where
|
|
sql =
|
|
"select pg_sleep($1)"
|
|
encoder =
|
|
E.value E.float8
|
|
decoder =
|
|
D.unit
|
|
|
|
|