[racket] in-query problems

From: George Neuner (gneuner2 at comcast.net)
Date: Fri Dec 12 12:49:34 EST 2014

Hi Robby,

Re-reading the docs following Ryan's exposition, I find that all the 
information actually is there.  There is an example of multiple returns, 
but I missed it or misinterpreted it because I expected that it would 
work like the other query functions ... only it doesn't.

My suggestion for the documents is to make more clear that in-query  
returns (values ...)  and that multiple returns have to handled as such.

Thanks,
George


On 12/12/2014 11:30 AM, Robby Findler wrote:
> Maybe another example in the docs somewhere would have helped?
>
> Robby
>
> On Fri, Dec 12, 2014 at 10:05 AM, George Neuner <gneuner2 at comcast.net> wrote:
> > On 12/11/2014 11:53 AM, Ryan Culpepper wrote:
> >>
> >>
> >>   Using in-query within a for loop:
> >>   > (for/list ([(n t) (in-query c "select n, t from numbers")])
> >>       (list n t))
> >>   '((1 "one") (2 "two") (3 "three") (4 "four") (5 "five"))
> >>
> >
> > Ok, so  in-query  does return multiple columns as (values ...). That will
> > work.  What's important is being able to get multiple columns - how they are
> > returned is less important.
> >
> > I appreciate you taking the time to explain it.  I wish I could have figured
> > it out myself.
> >
> > Thanks,
> > George


Posted on the users mailing list.