Add user creation route

This commit is contained in:
Joe Nelson
2014-12-06 17:42:18 -08:00
parent 8c073cedc6
commit 61174cfa17
2 changed files with 26 additions and 70 deletions
+2 -2
View File
@@ -61,8 +61,8 @@ parentheticT :: CompleteQueryT
parentheticT (sql, params) =
(" (" <> sql <> ") ", params)
aIffNotBT :: CompleteQuery -> CompleteQueryT
aIffNotBT (aq, ap) (bq, bp) =
iffNotT :: CompleteQuery -> CompleteQueryT
iffNotT (aq, ap) (bq, bp) =
("WITH aaa AS (" <> aq <> " returning *) " <>
bq <> "WHERE NOT EXISTS (SELECT * FROM aaa)"
, ap ++ bp