Testing
module Tests where
import T1QuerySerialization (t1)
Builds queries like
SELECT CAST(5, 'UInt8') as testSample;
via ToQueryPart type class
for every supported typeExecutes select
Parses the result
Checks if result equals initial value
import T2WriteReadEquality (t2)
- Runs insertInto of a sample into the all supported types table
- Runs selectFrom from the same table
- Checks if result equals sample value
How to run
You can manually run database and tests:
nix run .#testing
Main function
import ClickHaskell (ChCredential(..), openNativeConnection, defaultCredentials)
main :: IO ()
= do
main <- openNativeConnection defaultCredentials
connection mapM_
-> runner connection)
(\runner [t1,t2]