Skip to content

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

@violin0622

Description

@violin0622

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 ).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions