gen icon indicating copy to clipboard operation
gen copied to clipboard

GEN Can't generate correct time-related SQL

Open violin0622 opened this issue 11 months ago • 0 comments

GORM Playground Link

https://github.com/go-gorm/playground/pull/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 ).

violin0622 avatar Mar 25 '24 10:03 violin0622