amitkr / nodejs-db-informix

Infomix bindings for nodejs
MIT License
3 stars 3 forks source link

limit and skip parameters gets appended unwantedly #6

Closed selvaa89 closed 11 years ago

selvaa89 commented 11 years ago
      rs = connection.query("",
            [],
            function (err, results, details) {
                /*if (err) {
                    userDetail.permission_type_id = null;
                } else {
                    userDetail.permission_type_id = results[0].permission_type_id;
                }

                userDetailCb(null, userDetail);*/
                if (err) {
                    results = null;
                }
                console.log(JSON.stringify(results));
                connection.disconnect();
                callback(null, results);
            },

            {
                start: function (q) {
                    console.log("info", "START: " + JSON.stringify(q));
                },
                finish: function (f) {
                    console.log("info", "FINISH: " + JSON.stringify(f));
                },
                async: false,
                cast: true
            }
        )
        .select('user_id,permission_type_id')
        .from('user_permission_grant', false)
        .where("resource_id='" + projectId + "'")
        .execute();

The above code results in the quesy given below. Why the limit is getting appended?

SELECT LIMIT 0 user_id,permission_type_id FROM user_permission_grant WHERE resource_id='1245'

amitkr commented 11 years ago

would you please let me know the version you're using? i suspect you're on v0.0.6 which was buggy.

amitkr commented 11 years ago

also, which version of node you're using? i'd need these information before i can investigate further.

selvaa89 commented 11 years ago

Node version is 0.8.22.

On Thu, Mar 28, 2013 at 3:31 PM, Amit Kumar notifications@github.comwrote:

also, which version of node you're using? i'd need these information before i can investigate further.

— Reply to this email directly or view it on GitHubhttps://github.com/amitkr/nodejs-db-informix/issues/6#issuecomment-15577571 .

Regards, Selva

amitkr commented 11 years ago

and nodejs-db-informix version?

selvaa89 commented 11 years ago

The latest one

On Thu, Mar 28, 2013 at 5:06 PM, Amit Kumar notifications@github.comwrote:

and nodejs-db-informix version?

— Reply to this email directly or view it on GitHubhttps://github.com/amitkr/nodejs-db-informix/issues/6#issuecomment-15583816 .

Regards, Selva

amitkr commented 11 years ago

ok, i'll assume, by "latest" you mean master? would you be able to switch to v0.0.8 and try.

amitkr commented 11 years ago

i believe this is fixed on master now. Please re-test.