Sails: sendNativeQuery bug

Created on 8 Feb 2018  路  7Comments  路  Source: balderdashy/sails

Sails version: 1.0.0-45
Node version: 8.7.0
NPM version: 5.6.0
DB adapter name: sails-postgres
DB adapter version: 1.0.0-12
Operating system: Mac OS/Linux



Hello!
I'm using sails-postgresql
I used to use sails.sendNativeQuery and everything was ok. But now this function is not working.
I get this error:

TypeError: options.driver.sendNativeQuery(...).switch is not a function
    at Object.during (/Users/gleb/sites/ezy/node_modules/sails-hook-orm/lib/datastore-method-utils/help-send-native-query.js:61:16)
    at _makeCallToDuringFn (/Users/gleb/sites/ezy/node_modules/sails-hook-orm/lib/datastore-method-utils/private/do-with-connection.js:84:36)

Most helpful comment

@kaikash confirmed; looking into it.

All 7 comments

Hi @kaikash! It looks like you may have removed some required elements from the initial comment template, without which I can't verify that this post meets our contribution guidelines. To re-open this issue, please copy the template from here, paste it at the beginning of your initial comment, and follow the instructions in the text. Then post a new comment (e.g. "ok, fixed!") so that I know to go back and check.

Sorry to be a hassle, but following these instructions ensures that we can help you in the best way possible and keep the Sails project running smoothly.

*If you feel this message is in error, or you want to debate the merits of my existence (sniffle), please contact [email protected]

Hi @kaikash! It looks like you may have removed some required elements from the initial comment template, without which I can't verify that this post meets our contribution guidelines. To re-open this issue, please copy the template from here, paste it at the beginning of your initial comment, and follow the instructions in the text. Then post a new comment (e.g. "ok, fixed!") so that I know to go back and check.

Sorry to be a hassle, but following these instructions ensures that we can help you in the best way possible and keep the Sails project running smoothly.

*If you feel this message is in error, or you want to debate the merits of my existence (sniffle), please contact [email protected]

Hi @kaikash! It looks like you may have removed some required elements from the initial comment template, without which I can't verify that this post meets our contribution guidelines. To re-open this issue, please copy the template from here, paste it at the beginning of your initial comment, and follow the instructions in the text. Then post a new comment (e.g. "ok, fixed!") so that I know to go back and check.

Sorry to be a hassle, but following these instructions ensures that we can help you in the best way possible and keep the Sails project running smoothly.

*If you feel this message is in error, or you want to debate the merits of my existence (sniffle), please contact [email protected]

@kaikash Thanks for posting, we'll take a look as soon as possible.


For help with questions about Sails, click here. If you’re interested in hiring @sailsbot and her minions in Austin, click here.

@kaikash This seems like something that might be a version issue -- please try:

rm -rf node_modules && rm package-lock.json ; npm install

in your project.

Yes. In last version it is not working.

@kaikash confirmed; looking into it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

thomasfr picture thomasfr  路  3Comments

danil-z picture danil-z  路  3Comments

3imed-jaberi picture 3imed-jaberi  路  3Comments

svmn picture svmn  路  4Comments

pawankorotane picture pawankorotane  路  3Comments