-
-
Notifications
You must be signed in to change notification settings - Fork 626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Queries run with execute
don't use the global typeCast
function
#717
Comments
Dupe of my report here: #649 See discussion on that issue. |
let's continue discussion here @aikar @coreyjv suppose the data is coming as (number, date, string) field What should happen if you call If I place |
Personally I only use the typecast because of #262 where it doesn’t seem like mysql2 respects the timezone configuration parameter. If I didn’t have any issues with DATETIME I’d not use typecast. |
@sidorares are there any updates on this? |
It's still not very obvious to me how to make it compatible between query() and execute() In query results (almost) all fields are serialized as strings, so what typeCast api suggest is you call In execute result ( so called "binary protocol") each field type has it's own serialization format - length-prefixed 8/16/24/32/64 bit numbers, 8 byte datetime etc etc. Execute might convert all this to string first when wdyt @coreyjv ? |
@sidorares like I mentioned in my comment if #262 can be fixed then I don't need this feature. |
ok , I'll focus on fixing timezone options and we'll revisit this later |
Closing due to #2398 🎉
|
Is this by design or a bug? Ideally I'd like to use prepared statements to absolutely prevent SQL injection attacks but I need to use a custom typecast function because of issues with timezone in #262.
Thanks
The text was updated successfully, but these errors were encountered: