mirror of
https://github.com/khibino/haskell-relational-record.git
synced 2024-12-28 22:44:11 +03:00
example PostgreSQL: switch from 'testdb' to 'hrrtest'.
This commit is contained in:
parent
fe6da06983
commit
85d907e661
@ -10,7 +10,7 @@ import Database.HDBC.Schema.Driver (typeMap)
|
||||
import Database.HDBC.Query.TH (defineTableFromDB)
|
||||
|
||||
connect :: IO Connection
|
||||
connect = connectPostgreSQL "dbname=testdb"
|
||||
connect = connectPostgreSQL "dbname=hrrtest"
|
||||
|
||||
defineTable :: [(String, TypeQ)] -> String -> String -> [Name] -> Q [Dec]
|
||||
defineTable tmap =
|
||||
|
@ -1,20 +1,20 @@
|
||||
This example requires user access to PostgreSQL database
|
||||
which is named 'testdb' over UNIX domain socket.
|
||||
which is named 'hrrtest' over UNIX domain socket.
|
||||
|
||||
## Creating 'testdb'
|
||||
## Creating 'hrrtest'
|
||||
|
||||
% createdb testdb
|
||||
% createdb hrrtest
|
||||
|
||||
|
||||
## Example 1 case
|
||||
|
||||
% ./1/create.sh
|
||||
% runghc -i1 ./1/queryExample.hs
|
||||
% psql hrrtest < ./1/create.sql
|
||||
% runghc -i1 ./1/query.hs
|
||||
|
||||
...
|
||||
|
||||
|
||||
## Example 3 case
|
||||
|
||||
% ./3/create.sh
|
||||
% psql hrrtest < ./3/create.sql
|
||||
% runghc -i3 ./3/query.hs
|
||||
|
Loading…
Reference in New Issue
Block a user