@@ -640,21 +640,21 @@ instance PGTyped 'PGJsonb where pgtype = jsonb
640statements
640statements
641-----------------------------------------}
641-----------------------------------------}
643−newtype DataDefinition
643+newtype Definition
644 (schema0 :: [(Symbol,[(Symbol,ColumnType)])])
644 (schema0 :: [(Symbol,[(Symbol,ColumnType)])])
645 (schema1 :: [(Symbol,[(Symbol,ColumnType)])])
645 (schema1 :: [(Symbol,[(Symbol,ColumnType)])])
646− = UnsafeDataDefinition { renderDataDefinition :: ByteString }
646+ = UnsafeDefinition { renderDefinition :: ByteString }
648−instance Category DataDefinition where
648+instance Category Definition where
649− id = UnsafeDataDefinition ";"
649+ id = UnsafeDefinition ";"
650− dd1 . dd0 = UnsafeDataDefinition $
650+ dd1 . dd0 = UnsafeDefinition $
651− renderDataDefinition dd0 <> " " <> renderDataDefinition dd1
651+ renderDefinition dd0 <> " " <> renderDefinition dd1
653−newtype DataManipulation
653+newtype Manipulation
654 (schema :: [(Symbol,[(Symbol,ColumnType)])])
654 (schema :: [(Symbol,[(Symbol,ColumnType)])])
655 (params :: [ColumnType])
655 (params :: [ColumnType])
656 (columns :: [(Symbol,ColumnType)])
656 (columns :: [(Symbol,ColumnType)])
657− = UnsafeDataManipulation { renderDataManipulation :: ByteString }
657+ = UnsafeManipulation { renderManipulation :: ByteString }
659newtype Query
659newtype Query
660 (schema :: [(Symbol,[(Symbol,ColumnType)])])
660 (schema :: [(Symbol,[(Symbol,ColumnType)])])
@@ -664,8 +664,8 @@ newtype Query
666 :: Query schema params columns
666 :: Query schema params columns
667− -> DataManipulation schema params columns
667+ -> Manipulation schema params columns
668−query q = UnsafeDataManipulation $ renderQuery q <> ";"
668+query q = UnsafeManipulation $ renderQuery q <> ";"
670union, unionAll, intersect, intersectAll, except, exceptAll
670union, unionAll, intersect, intersectAll, except, exceptAll
671 :: Query schema params columns
671 :: Query schema params columns
@@ -723,8 +723,8 @@ createTable
723 :: (KnownSymbol table, SListI columns)
723 :: (KnownSymbol table, SListI columns)
724 => Alias table
724 => Alias table
725 -> NP (Aliased TypeExpression) columns
725 -> NP (Aliased TypeExpression) columns
726− -> DataDefinition schema (Create table columns schema)
726+ -> Definition schema (Create table columns schema)
727−createTable table columns = UnsafeDataDefinition $ mconcat
727+createTable table columns = UnsafeDefinition $ mconcat
728 [ "CREATE TABLE "
728 [ "CREATE TABLE "
729 , renderAlias table
729 , renderAlias table
@@ -744,8 +744,8 @@ DROP statements
745 :: KnownSymbol table
745 :: KnownSymbol table
746 => Alias table
746 => Alias table
747− -> DataDefinition schema (Drop table schema)
747+ -> Definition schema (Drop table schema)
748−dropTable table = UnsafeDataDefinition $ "DROP TABLE " <> renderAlias table <> ";"
748+dropTable table = UnsafeDefinition $ "DROP TABLE " <> renderAlias table <> ";"
750{-----------------------------------------
750{-----------------------------------------
751ALTER statements
751ALTER statements
@@ -755,8 +755,8 @@ alterTable
755 :: HasTable table schema columns0
755 :: HasTable table schema columns0
756 => Alias table
756 => Alias table
757 -> AlterTable columns0 columns1
757 -> AlterTable columns0 columns1
758− -> DataDefinition schema (Alter table schema columns1)
758+ -> Definition schema (Alter table schema columns1)
759−alterTable table alteration = UnsafeDataDefinition $
759+alterTable table alteration = UnsafeDefinition $
760 "ALTER TABLE "
760 "ALTER TABLE "
761 <> renderAlias table
761 <> renderAlias table
@@ -767,8 +767,8 @@ alterTableRename
767 :: (KnownSymbol table0, KnownSymbol table1)
767 :: (KnownSymbol table0, KnownSymbol table1)
768 => Alias table0
768 => Alias table0
769 -> Alias table1
769 -> Alias table1
770− -> DataDefinition schema (Rename table0 table1 schema)
770+ -> Definition schema (Rename table0 table1 schema)
771−alterTableRename table0 table1 = UnsafeDataDefinition $
771+alterTableRename table0 table1 = UnsafeDefinition $
772 "ALTER TABLE "
772 "ALTER TABLE "
773 <> renderAlias table0
773 <> renderAlias table0
774 <> " RENAME TO "
774 <> " RENAME TO "
@@ -861,8 +861,8 @@ insertInto
861 :: (SListI columns, HasTable table schema columns)
861 :: (SListI columns, HasTable table schema columns)
862 => Alias table
862 => Alias table
863 -> NP (Aliased (Expression params '[])) columns
863 -> NP (Aliased (Expression params '[])) columns
864− -> DataManipulation schema params '[]
864+ -> Manipulation schema params '[]
865−insertInto table expressions = UnsafeDataManipulation $ "INSERT INTO "
865+insertInto table expressions = UnsafeManipulation $ "INSERT INTO "
866 <> renderAlias table
866 <> renderAlias table
867 <> " (" <> ByteString.intercalate ", " aliases
867 <> " (" <> ByteString.intercalate ", " aliases
868 <> ") VALUES ("
868 <> ") VALUES ("
@@ -881,9 +881,9 @@ insertIntoReturning
881 => Alias table
881 => Alias table
882 -> NP (Aliased (Expression params '[])) columns
882 -> NP (Aliased (Expression params '[])) columns
883 -> NP (Aliased (Expression params '[table ::: columns])) results
883 -> NP (Aliased (Expression params '[table ::: columns])) results
884− -> DataManipulation schema params results
884+ -> Manipulation schema params results
885insertIntoReturning table inserts results
885insertIntoReturning table inserts results
886− = UnsafeDataManipulation . mconcat $
886+ = UnsafeManipulation . mconcat $
887 [ "INSERT INTO "
887 [ "INSERT INTO "
888 , renderAlias table
888 , renderAlias table
889 , " (" <> ByteString.intercalate ", " aliases
889 , " (" <> ByteString.intercalate ", " aliases
@@ -929,8 +929,8 @@ update
929 => Alias table
929 => Alias table
930 -> NP (Aliased (UpdateExpression params '[table ::: columns])) columns
930 -> NP (Aliased (UpdateExpression params '[table ::: columns])) columns
931 -> Condition params '[table ::: columns]
931 -> Condition params '[table ::: columns]
932− -> DataManipulation schema params '[]
932+ -> Manipulation schema params '[]
933−update table columns wh = UnsafeDataManipulation $ mconcat
933+update table columns wh = UnsafeManipulation $ mconcat
934 [ "UPDATE "
934 [ "UPDATE "
935 , renderAlias table
935 , renderAlias table
936 , " SET "
936 , " SET "
@@ -945,8 +945,8 @@ updateReturning
945 -> NP (Aliased (UpdateExpression params '[table ::: columns])) columns
945 -> NP (Aliased (UpdateExpression params '[table ::: columns])) columns
946 -> Condition params '[table ::: columns]
946 -> Condition params '[table ::: columns]
947 -> NP (Aliased (Expression params '[table ::: columns])) results
947 -> NP (Aliased (Expression params '[table ::: columns])) results
948− -> DataManipulation schema params results
948+ -> Manipulation schema params results
949−updateReturning table updates wh results = UnsafeDataManipulation $ mconcat
949+updateReturning table updates wh results = UnsafeManipulation $ mconcat
950 [ "UPDATE "
950 [ "UPDATE "
951 , renderAlias table
951 , renderAlias table
952 , " SET "
952 , " SET "
@@ -968,8 +968,8 @@ upsertInto
968 -> NP (Aliased (Expression params '[])) columns
968 -> NP (Aliased (Expression params '[])) columns
969 -> NP (Aliased (UpdateExpression params '[table ::: columns])) columns
969 -> NP (Aliased (UpdateExpression params '[table ::: columns])) columns
970 -> Condition params '[table ::: columns]
970 -> Condition params '[table ::: columns]
971− -> DataManipulation schema params '[]
971+ -> Manipulation schema params '[]
972−upsertInto table inserts updates wh = UnsafeDataManipulation . mconcat $
972+upsertInto table inserts updates wh = UnsafeManipulation . mconcat $
973 [ "INSERT INTO "
973 [ "INSERT INTO "
974 , renderAlias table
974 , renderAlias table
975 , " (" <> ByteString.intercalate ", " aliases
975 , " (" <> ByteString.intercalate ", " aliases
@@ -996,9 +996,9 @@ upsertIntoReturning
996 -> NP (Aliased (UpdateExpression params '[table ::: columns])) columns
996 -> NP (Aliased (UpdateExpression params '[table ::: columns])) columns
997 -> Condition params '[table ::: columns]
997 -> Condition params '[table ::: columns]
998 -> NP (Aliased (Expression params '[table ::: columns])) results
998 -> NP (Aliased (Expression params '[table ::: columns])) results
999− -> DataManipulation schema params results
999+ -> Manipulation schema params results
1000upsertIntoReturning table inserts updates wh results =
1000upsertIntoReturning table inserts updates wh results =
1001− UnsafeDataManipulation . mconcat $
1001+ UnsafeManipulation . mconcat $
1002 [ "INSERT INTO "
1002 [ "INSERT INTO "
1003 , renderAlias table
1003 , renderAlias table
1004 , " (" <> ByteString.intercalate ", " aliases
1004 , " (" <> ByteString.intercalate ", " aliases
@@ -1032,8 +1032,8 @@ deleteFrom
1032 :: HasTable table schema columns
1032 :: HasTable table schema columns
1033 => Alias table
1033 => Alias table
1034 -> Condition params '[table ::: columns]
1034 -> Condition params '[table ::: columns]
1035− -> DataManipulation schema params '[]
1035+ -> Manipulation schema params '[]
1036−deleteFrom table wh = UnsafeDataManipulation $ mconcat
1036+deleteFrom table wh = UnsafeManipulation $ mconcat
1037 [ "DELETE FROM "
1037 [ "DELETE FROM "
1038 , renderAlias table
1038 , renderAlias table
1039 , " WHERE ", renderExpression wh, ";"
1039 , " WHERE ", renderExpression wh, ";"