David Ireland
2018-10-07 11:08:48 UTC
Hi,
I'm using the database access in Awful and I'm having the troubles
recreating an example in the docs. After setting up a dummy postgres
database I tried this example:
($db "insert into foo (bar, baz) values (?, ?)" values: '("bar-val" "baz-val"))
Which produced this error:
<eval> ($db "insert into foo (bar, baz) values (?, ?)" values:
(quote ("bar-val" "baz-val"))) <--
Error: (get-last-result) ERROR: syntax error at or near ","
LINE 1: insert into foo (bar, baz) values (?, ?)
If I manually add the values using:
($db "insert into company (bar, baz) values ('bar-val', 'baz-val')")
It works fine. Am I missing something with the former?
Thanks.
David
I'm using the database access in Awful and I'm having the troubles
recreating an example in the docs. After setting up a dummy postgres
database I tried this example:
($db "insert into foo (bar, baz) values (?, ?)" values: '("bar-val" "baz-val"))
Which produced this error:
<eval> ($db "insert into foo (bar, baz) values (?, ?)" values:
(quote ("bar-val" "baz-val"))) <--
Error: (get-last-result) ERROR: syntax error at or near ","
LINE 1: insert into foo (bar, baz) values (?, ?)
If I manually add the values using:
($db "insert into company (bar, baz) values ('bar-val', 'baz-val')")
It works fine. Am I missing something with the former?
Thanks.
David