remove ';' from queries

This commit is contained in:
Swrup 2022-04-04 21:15:04 +02:00
parent e774ca5a08
commit c7582c958c
5 changed files with 77 additions and 78 deletions

View file

@ -17,7 +17,7 @@ let () =
"CREATE TABLE IF NOT EXISTS msg ( msg_id TEXT, from_id TEXT, to_id TEXT, \
msg TEXT, PRIMARY KEY(msg_id), FOREIGN KEY(from_id) REFERENCES \
user(user_id) ON DELETE CASCADE, FOREIGN KEY(to_id) REFERENCES \
user(user_id) ON DELETE CASCADE);"
user(user_id) ON DELETE CASCADE)"
in
match Db.exec create_msg_table () with
| Ok () -> ()
@ -136,7 +136,7 @@ let render_one request =
let insert_msg =
let insert_msg =
(Caqti_type.(tup3 string string string) ->. Caqti_type.unit)
"INSERT INTO msg VALUES (NULL, ?, ?, ?);"
"INSERT INTO msg VALUES (NULL, ?, ?, ?)"
in
fun from_id to_id msg ->
let open Syntax in