Loading ...
Sorry, an error occurred while loading the content.

Re: [taffydb] What does a query give me back?

Expand Messages
  • Ian Toltz
    It returns a TAFFY something-or-other, not an array. Use .first() to get the first row. It would be nice if we could access the rows like an array... ... --
    Message 1 of 2 , Jul 28, 2012
    View Source
    • 0 Attachment
      It returns a TAFFY something-or-other, not an array.

      Use .first() to get the first row.

      It would be nice if we could access the rows like an array...

      On Sat, Jul 28, 2012 at 4:57 PM, Karl <karlcoleman@...> wrote:
       

      I'm new to TaffyDB. One thing I can't figure out is what exactly does a query give back? I've used .each() with my other queries as I knew I'd be getting back multiple rows. Now I have an id and want to look up to get the person's name back, so it's only one record.

      This is the query:

      var nameRec = players({PlayerId:id});

      Pretty basic. So what is nameRec? I've tried treating it as an array with no luck. Thanks.

      Karl




      --
      -Ian Toltz
    Your message has been successfully submitted and would be delivered to recipients shortly.