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

getting error on operator isNull and isUndefined

Expand Messages
  • buddhabauchtraeger
    Hi. First of all I would like to say that this lib is a very nice one and will give a great support for developers. Unfortunately I discovered an error saying
    Message 1 of 2 , Oct 17, 2011
    • 0 Attachment
      Hi.

      First of all I would like to say that this lib is a very nice one and will give a great support for developers.

      Unfortunately I discovered an error saying 'mvalue is undefined' (line 231) when trying to use the query operators 'isNull' or 'isUndefined' (with Version 2.3.5). (Haven't tried ALL operators, yet.)

      Here's a little example I was trying to explore the error with:

      var testDB = new TAFFY([
      {col1:'col1' ,col2:'col1.2'},
      {col1:'col1' ,col2:'col2.2'},
      {col1:'col1' ,col2:'col3.2',col3:'col3.3'},
      {col1:'col1.1',col2:'col4.2',col3:null}
      ]);
      var query = testDB({col3:{isNull:false}});
      console.log(query.count());

      With a peak look at the code I was missing the definition of the 'isNull' operator (but I'm not that expert in JS), so I was wondering if the API doc on the website (page "writing queries") may be out of date?!?

      Is there (still) a short way with an operator to check, if a value is null (or an attribute undefined) or must it be done manually within an 'each' function?

      Thanks for support,
      Dennis
    • taffydb-owner@yahoogroups.com
      Hey Dennis, Sorry for the slow response. I was had a bit of code injecting itself ahead of the isNull/isUndefined operation and causing a problem. Finally
      Message 2 of 2 , Oct 20, 2011
      • 0 Attachment
        Hey Dennis,

        Sorry for the slow response. I was had a bit of code injecting itself ahead of the isNull/isUndefined operation and causing a problem. Finally tracked it down.

        I pushed out a fix.

        Ian

        --- In taffydb@yahoogroups.com, "buddhabauchtraeger" <dennis.galander@...> wrote:
        >
        > Hi.
        >
        > First of all I would like to say that this lib is a very nice one and will give a great support for developers.
        >
        > Unfortunately I discovered an error saying 'mvalue is undefined' (line 231) when trying to use the query operators 'isNull' or 'isUndefined' (with Version 2.3.5). (Haven't tried ALL operators, yet.)
        >
        > Here's a little example I was trying to explore the error with:
        >
        > var testDB = new TAFFY([
        > {col1:'col1' ,col2:'col1.2'},
        > {col1:'col1' ,col2:'col2.2'},
        > {col1:'col1' ,col2:'col3.2',col3:'col3.3'},
        > {col1:'col1.1',col2:'col4.2',col3:null}
        > ]);
        > var query = testDB({col3:{isNull:false}});
        > console.log(query.count());
        >
        > With a peak look at the code I was missing the definition of the 'isNull' operator (but I'm not that expert in JS), so I was wondering if the API doc on the website (page "writing queries") may be out of date?!?
        >
        > Is there (still) a short way with an operator to check, if a value is null (or an attribute undefined) or must it be done manually within an 'each' function?
        >
        > Thanks for support,
        > Dennis
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.