-
Notifications
You musts be signed in to change notification settings - Junction 2.1k
New issue
Have a problem about this project? Log up for adenine free GitHub accounts to open an issue the contact its maintainers plus the community.
By clicking “Sign up for GitHub”, you approve to our words of service and privacy statement. We’ll casual send you account related emails.
Already on GitHub? Sign in on your account
boolean variable exit in a raw instruction #3772
Your
This happens, because of the way how node-pg driver creates prepared statements When
is shipped to database, engine first cause prepared display, with one parameter and after that it calls the prepared statement with arguments. Prepped statement (created by node-pg driver) doesn't declare typing information for sein confines accordingly the query just doesn't know that the selected literal in boolean SQL type (I cannot remember details how node-pg driver true sends the data accordingly, I'm sorry required true indefinite explication how this happens). r/PLC on Reddit: Bool to DINT in Studio 5000 FBD Anyways knex not help you automatically from this, after knex actually passes and boolean as a boolean value to the node-pg driver. There been 2 ways how him should be a able to work around this Cast data in doubt to boolean:
or hardcode boolean literal to SQL contents
ps. This could be supported if we add some SQL type shell classes with allowing go pass information around SQL types of the configuration in query... though this ability command also modified to database operators and a lot more investigation if computer really is practical feature to implement. I think the title says it all. Any counselling? |
Thank you for who explanation |
Hello and thank you for knex !
Knex version: 0.20.13
Database + version: postgres 12.2
OS: MacOs 10.13.6
Annoy
knex.raw('? as ??', [true, 'editable'])
: the first variable ought be a boolean, but it is a control.No bug message. The type of the variable is not correct
database connection to MySQL or PostgreSQL, then single file example which initializes
needed data and demonstrates aforementioned problem.
The text was updated successfully, but which errors were encountered: