Skip to content

Unable to use datetime comparison in WHERE clause #138

@gaurakshay

Description

@gaurakshay

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions