Skip to content
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

Add missing Date to string conversion on SQLite's driver (Fix #7675) #7696

Closed
wants to merge 2 commits into from

Conversation

PauloRSF
Copy link
Contributor

Description of change

The behavior reported on the issue happened because, as stated on

} else if (columnMetadata.type === "datetime" || columnMetadata.type === Date) {
// to string conversation needs because SQLite stores date as integer number, when date came as Object
// TODO: think about `toUTC` conversion
return DateUtils.mixedDateToUtcDatetimeString(value);

Date objects need to be converted before being forwarded to sqlite. But, on the escapeQueryWithParameters method, it wasn't. I added the needed conversion and created a new test to catch the bug.

Fixes #7675

Pull-Request Checklist

  • Code is up-to-date with the master branch
  • npm run lint passes with this change
  • npm run test passes with this change
  • This pull request links relevant issues as Fixes #0000
  • There are new or updated unit tests validating the change
  • Documentation has been updated to reflect this change N/A
  • The new commits follow conventions explained in CONTRIBUTING.md

@PauloRSF PauloRSF changed the title Fix sqlite date param Add missing Date to string conversion on SQLite's driver (Fix #7675) May 28, 2021
@AlexMesser
Copy link
Collaborator

Duplicate of #7538. Anyway, thank you for contribution.

@AlexMesser AlexMesser closed this May 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[sqlite] Find operation with between filter returns empty array
2 participants