Feature Request: Handling JS Date variables #334
Labels
Comments
|
This would be a useful feature. Pull requests are welcome! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
First of all, thanks for creating/maintaining this amazing library. I'll cut into my request.
Background
I am using sql.js with typeorm to do integration testing rather than spinning up a mysql service for that.
Issue
I noted that if I use Javascript
Dateobjects in the where conditions, it works in production, but fails in tests, because sql.js doesn't convert the dates similar to how node-mysql driver does that.Expectation
I would love it if sql.js would convert the dates correctly.
For example, take the following example:
Now, this fails because sql.js would call
updatedAt.toString(). But AFAIK, in node-mysql they callupdatedAt.toISOString()(or some valid date string) internally.Notes
updatedAt.toISOString()explicitlyThe text was updated successfully, but these errors were encountered: