2 module Database.PostgreSQL.Simple,
3 module Test.Tasty.HUnit,
8import Data.ByteString (ByteString)
10import Database.PostgreSQL.Simple
11import Test.Tasty.HUnit
13import qualified Crypto.Hash.MD5 as MD5
14import qualified Data.ByteString.Base16 as Base16
15import qualified Data.Text.Encoding as TE
20 -- ^ Connection shared by all the tests
21 , withConn :: forall a. (Connection -> IO a) -> IO a
22 -- ^ Bracket for spawning additional connections
25-- | Return the MD5 hash of a 'ByteString', in lowercase hex format.
29-- >[Only hash] <- query_ conn "SELECT md5('hi')"
30-- >assertEqual "md5('hi')" (md5 "hi") hash
31md5 :: ByteString -> Text
32md5 = TE.decodeUtf8 . Base16.encode . MD5.hash
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list