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

GEN Can't generate correct time-related SQL #1106

Open
violin0622 opened this issue Mar 25, 2024 · 0 comments
Open

GEN Can't generate correct time-related SQL #1106

violin0622 opened this issue Mar 25, 2024 · 0 comments

Comments

@violin0622
Copy link

violin0622 commented Mar 25, 2024

GORM Playground Link

go-gorm/playground#706

Description

When I use GEN to update the time like this, it generates incorrect SQL.

截屏2024-03-25 18 40 51

It seems GEN will only adapt MySQL time function(i.e. DATE_ADD),
even the driver used is sqlite (shoud be datetime(updated_at, '+1 second') )or postgresql (should be updated_at + interval 1 second ).

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

No branches or pull requests

1 participant