@@ -47,13 +47,13 @@ spec = do
48 statement :: Statement '[] Columns Tables Tables
48 statement :: Statement '[] Columns Tables Tables
49 statement = select $ starFrom (#table1 & limit 1)
49 statement = select $ starFrom (#table1 & limit 1)
50− statement `shouldRenderAs` "SELECT * FROM table1 AS table1 LIMIT 1;"
50+ statement `shouldRenderAs` "SELECT * FROM table1 AS table1 LIMIT 1.;"
51 it "should use the minimum of given LIMITs" $ do
51 it "should use the minimum of given LIMITs" $ do
53 statement :: Statement '[] Columns Tables Tables
53 statement :: Statement '[] Columns Tables Tables
54 statement = select $ starFrom (#table1 & limit 1 & limit 2)
54 statement = select $ starFrom (#table1 & limit 1 & limit 2)
55 statement `shouldRenderAs`
55 statement `shouldRenderAs`
56− "SELECT * FROM table1 AS table1 LIMIT CASE WHEN (1 <= 2) THEN 1 ELSE 2 END;"
56+ "SELECT * FROM table1 AS table1 LIMIT CASE WHEN (1. <= 2.) THEN 1. ELSE 2. END;"
57 it "should render parameters using $ signs" $ do
57 it "should render parameters using $ signs" $ do
59 statement :: Statement '[ 'Required ('NotNull 'PGInt8)] Columns Tables Tables
59 statement :: Statement '[ 'Required ('NotNull 'PGInt8)] Columns Tables Tables
@@ -63,18 +63,18 @@ spec = do
64 statement :: Statement '[] Columns Tables Tables
64 statement :: Statement '[] Columns Tables Tables
65 statement = select $ starFrom (#table1 & offset 1)
65 statement = select $ starFrom (#table1 & offset 1)
66− statement `shouldRenderAs` "SELECT * FROM table1 AS table1 OFFSET 1;"
66+ statement `shouldRenderAs` "SELECT * FROM table1 AS table1 OFFSET 1.;"
67 it "should use the sum of given OFFSETs" $ do
67 it "should use the sum of given OFFSETs" $ do
69 statement :: Statement '[] Columns Tables Tables
69 statement :: Statement '[] Columns Tables Tables
70 statement = select $ starFrom (#table1 & offset 1 & offset 2)
70 statement = select $ starFrom (#table1 & offset 1 & offset 2)
71− statement `shouldRenderAs` "SELECT * FROM table1 AS table1 OFFSET (1 + 2);"
71+ statement `shouldRenderAs` "SELECT * FROM table1 AS table1 OFFSET (1. + 2.);"
72 it "correctly render simple INSERTs" $ do
72 it "correctly render simple INSERTs" $ do
74 statement :: Statement '[] '[] Tables Tables
74 statement :: Statement '[] '[] Tables Tables
75 statement = insertInto #table1 $ 2 `As` #col1 :* 4 `As` #col2 :* Nil
75 statement = insertInto #table1 $ 2 `As` #col1 :* 4 `As` #col2 :* Nil
76 statement `shouldRenderAs`
76 statement `shouldRenderAs`
77− "INSERT INTO table1 (col1, col2) VALUES (2, 4);"
77+ "INSERT INTO table1 (col1, col2) VALUES (2., 4.);"
78 it "should be safe against SQL injection in literal text" $ do
78 it "should be safe against SQL injection in literal text" $ do
80 statement :: Statement '[] '[] StudentsTable StudentsTable
80 statement :: Statement '[] '[] StudentsTable StudentsTable
@@ -145,7 +145,7 @@ spec = do
145 :* (int8 & notNull & default_ 8) `As` #col3
145 :* (int8 & notNull & default_ 8) `As` #col3
147 `shouldRenderAs`
147 `shouldRenderAs`
148− "CREATE TABLE table2 (col1 serial, col2 text, col3 int8 NOT NULL DEFAULT 8);"
148+ "CREATE TABLE table2 (col1 serial, col2 text, col3 int8 NOT NULL DEFAULT 8.);"
149 it "should render DROP TABLE statements" $ do
149 it "should render DROP TABLE statements" $ do
151 statement :: Statement '[] '[] Tables '[]
151 statement :: Statement '[] '[] Tables '[]