Skip to content

Commit

Permalink
Use defaultCredentials in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
KovalevDima committed Jan 11, 2025
1 parent b975899 commit fba755d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
12 changes: 2 additions & 10 deletions usage/insertInto.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module Writing where
import ClickHaskell
( WritableInto, insertInto
, ChCredential(..), openNativeConnection
, openNativeConnection, defaultCredentials
, Table, Column
, toChType
, ChDateTime, ChInt64, ChString, ChUUID
Expand All @@ -40,15 +40,7 @@ import GHC.Generics (Generic)
main :: IO ()
main = do
let credentials = MkChCredential
{ chLogin = "default"
, chPass = ""
, chHost = "localhost"
, chDatabase = "default"
, chPort = "9000"
}
connection <- openNativeConnection credentials
connection <- openNativeConnection defaultCredentials
insertInto
@ExampleTable
@ExampleData
Expand Down
12 changes: 2 additions & 10 deletions usage/selectFromView.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,16 @@ module ReadingView where
import ClickHaskell
( ReadableFrom, selectFromView, Column
, ChCredential(..)
, View, Parameter, parameter
, openNativeConnection
, openNativeConnection, defaultCredentials
, ChString, ChInt32
)
import Data.Int (Int32)
import GHC.Generics (Generic)
main :: IO ()
main = do
let credentials = MkChCredential
{ chLogin = "default"
, chPass = ""
, chHost = "localhost"
, chDatabase = "default"
, chPort = "9000"
}
connection <- openNativeConnection credentials
connection <- openNativeConnection defaultCredentials
mapM_ print
=<<
selectFromView
Expand Down

0 comments on commit fba755d

Please sign in to comment.