forked from bortzmeyer/GaBuZoMeu
Small SQL typos
This commit is contained in:
parent
7a527cc06c
commit
8746a28bf4
@ -11,8 +11,8 @@ escape = concatMap fixChar
|
|||||||
|
|
||||||
maybeToPostgreSQL Nothing = "NULL"
|
maybeToPostgreSQL Nothing = "NULL"
|
||||||
maybeToPostgreSQL (Just s) = "'" ++ (escape s) ++ "'"
|
maybeToPostgreSQL (Just s) = "'" ++ (escape s) ++ "'"
|
||||||
maybeListToPostgreSQL Nothing = ""
|
maybeListToPostgreSQL Nothing = "NULL"
|
||||||
maybeListToPostgreSQL (Just s) = "'" ++ (foldr (++) "" s) ++ "'"
|
maybeListToPostgreSQL (Just s) = "'" ++ (foldr (++) "" (map escape s)) ++ "'"
|
||||||
|
|
||||||
onedescrToPostgreSQL "language" i s = "INSERT INTO Descriptions (description) " ++
|
onedescrToPostgreSQL "language" i s = "INSERT INTO Descriptions (description) " ++
|
||||||
" VALUES ('" ++ (escape s) ++ "');\n" ++
|
" VALUES ('" ++ (escape s) ++ "');\n" ++
|
||||||
|
@ -11,8 +11,8 @@ escape = concatMap fixChar
|
|||||||
|
|
||||||
maybeToSQLite Nothing = "NULL"
|
maybeToSQLite Nothing = "NULL"
|
||||||
maybeToSQLite (Just s) = "'" ++ (escape s) ++ "'"
|
maybeToSQLite (Just s) = "'" ++ (escape s) ++ "'"
|
||||||
maybeListToSQLite Nothing = ""
|
maybeListToSQLite Nothing = "NULL"
|
||||||
maybeListToSQLite (Just s) = "'" ++ (foldr (++) "" s) ++ "'"
|
maybeListToSQLite (Just s) = "'" ++ (foldr (++) "" (map escape s)) ++ "'"
|
||||||
|
|
||||||
-- TODO: use "SELECT last_insert_rowid();" is probably cleaner than
|
-- TODO: use "SELECT last_insert_rowid();" is probably cleaner than
|
||||||
-- "SELECT max(oid)"
|
-- "SELECT max(oid)"
|
||||||
|
Loading…
Reference in New Issue
Block a user