on dev help sign in
remove commented code
commitea4c7e51aefb68c9d9a7e9d5e6c01d37aadaacc6 authorEitan Chatav <eitan.chatav@gmail.com> dateSun 6 Aug 2017, 13:44 (9 years ago) parent6adfc90
1 file changed+2−24
squeel-postgresql/exe/Example.hs+2−24
squeel-postgresql/exe/Example.hs+2−24
@@ -42,9 +42,8 @@ main = do
4242 :* Nil )
4343 Char8.putStrLn "querying"
4444 connection2 :: Connection Tables <- flip execPQ connection1 $ do
45− for_ [I i :* I (i+1) :* Nil | i <- [1::Int32,3..9]] $
46− pqExecParams
47− (insertInto #table1 (param1 `As` #col1 :* param2 `As` #col2 :* Nil))
45+ for_ [I i :* I (i+1) :* Nil | i <- [1::Int32,3..9]] $ pqExecParams
46+ (insertInto #table1 (param1 `As` #col1 :* param2 `As` #col2 :* Nil))
4847 Just result <- pqExecNil . query $
4948 selectStar (from (Table (#table1 `As` #table1)))
5049 runMaybeT . runExceptT . flip runValue result $ do
@@ -70,26 +69,5 @@ type Columns =
7069 '[ "col1" ::: 'Required ('NotNull 'PGInt4)
7170 , "col2" ::: 'Required ('NotNull 'PGInt4)
7271 ]
73−-- type SumAndCol1 = '[ "sum" ::: 'NotNull 'PGInt4, "col1" ::: 'NotNull 'PGInt4]
7472type StudentsColumns = '["name" ::: 'Required ('NotNull 'PGText)]
7573type Tables = '["students" ::: StudentsColumns, "table1" ::: Columns]
76−-- type OrderColumns =
77−-- [ "orderID" ::: 'NotNull 'PGInt4
78−-- , "orderVal" ::: 'NotNull 'PGText
79−-- , "customerID" ::: 'NotNull 'PGInt4
80−-- , "shipperID" ::: 'NotNull 'PGInt4
81−-- ]
82−-- type CustomerColumns =
83−-- [ "customerID" ::: 'NotNull 'PGInt4, "customerVal" ::: 'NotNull 'PGFloat4 ]
84−-- type ShipperColumns =
85−-- [ "shipperID" ::: 'NotNull 'PGInt4, "shipperVal" ::: 'NotNull 'PGBool ]
86−-- type JoinTables =
87−-- [ "shippers" ::: ShipperColumns
88−-- , "customers" ::: CustomerColumns
89−-- , "orders" ::: OrderColumns
90−-- ]
91−-- type ValueColumns =
92−-- [ "orderVal" ::: 'NotNull 'PGText
93−-- , "customerVal" ::: 'NotNull 'PGFloat4
94−-- , "shipperVal" ::: 'NotNull 'PGBool
95−-- ]