[Ur] SQL Question
Adam Chlipala
adamc at csail.mit.edu
Fri Oct 3 08:34:34 EDT 2014
On 10/02/2014 11:54 PM, Burton Samograd wrote:
> and posts' () : xbody =
> posts' <- queryX (SELECT * FROM posts)
> (fn row => post' {[row.Posts.Title]} {[row.Posts.Body]}
> {[row.Posts.Author]} {[row.Posts.Created]});
The curly-braces-and-brackets notation is only valid inside code
snippets of embedded languages, like HTML and SQL. It's not legal in
the positions you're using it above. Actually, you can just remove it
there!
> Can SQL only be used in a transaction?
Yes, that's the other problem I see in the code. Database access is
only allowed in transactions.
More information about the Ur
mailing list