[racket] Racket DB Library, data conversion

From: Sean Kanaley (skanaley at gmail.com)
Date: Sat Feb 14 09:34:09 EST 2015

Hello All,

I would like to query based on an incoming hash (with help of json
library), but I don't see a built-in way to generate query needed. There is
a rows->dict but I don't see either a dict->where-clause or at least
whatever query uses in that dollar sign magic to convert
Racket-val->SQL-string.

Currently I have a function which takes a hash and makes "<col1>=$1
<boolean> <col2>=$2..." so I can then do something like (apply query <the
above string> <the vals returned by that same function as it built that
string>). It would be nice and probably more efficient if the value could
just be spliced in while I build the string to begin with, but it seems
like only query has such dollar sign conversion power available.

Am I missing something?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20150214/3e25611a/attachment.html>

Posted on the users mailing list.