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

Unable to use datetime comparison in WHERE clause #138

Closed
gaurakshay opened this issue Jan 3, 2025 · 2 comments
Closed

Unable to use datetime comparison in WHERE clause #138

gaurakshay opened this issue Jan 3, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@gaurakshay
Copy link

Describe the bug
Unable to run a query with a WHERE clause that uses datetime comparison.

To Reproduce
With the latest version available in winget (0.33.0), running the following query results in an error being thrown:
gitql -q 'SELECT commit_id, author_name, datetime FROM commits WHERE datetime > "2024-01-01 00:00:00"'

Error message:

[Error]: Operator `>` can't be performed between types `DateTime` and `Text`
  --> Location 1:68
   |
-> | SELECT commit_id, author_name, datetime FROM commits WHERE datetime > "2024-01-01 00:00:00"
   |
   | -------------------------------------------------------------------^
   |

Expected behavior
Query should run correctly.

Screenshots
gitql_datetime_error

GQL (please complete the following information):

  • Version 0.33.0

Additional context
The version 0.28.0 works. I was unable to install any version between 0.33.0 and 0.28.0 to pinpoint exactly which version introduced this issue.
Environment details:
OS: Windows 11 (24H2)
Shell: Powershell
Terminal: Windows Terminal

@AmrDeveloper
Copy link
Owner

Hello @gaurakshay,

Thank you for reporting, it's was a small issue in implicit casting, I fixed it, I will double check other operators and release it soon

Thank you,
Amr

@AmrDeveloper AmrDeveloper added the bug Something isn't working label Jan 3, 2025
@AmrDeveloper
Copy link
Owner

Gitql 0.35.0 is released with the fix, a new table and function for diff

https://github.com/AmrDeveloper/GQL/releases/tag/0.35.0

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants