-
Notifications
You must be signed in to change notification settings - Fork 222
Open
Description
I am trying to use goqu and executing it from the official example:
https://github.com/doug-martin/goqu/blob/master/docs/updating.md#limit

(By the way, the lable is wrong)
But I found that the result is inconsistent with the example
func main() {
ds := goqu.Dialect("mysql").
Update("test").
Set(goqu.Record{"foo": "bar"}).
Limit(10)
sql, _, _ := ds.ToSQL()
fmt.Println(sql)
}
// result:
// UPDATE "test" SET "foo"='bar'
// expected UPDATE "test" SET "foo"='bar' LIMIT 10Another example is UPDATE ORDER:
func main() {
ds := goqu.Dialect("mysql").
Update("test").
Set(goqu.Record{"foo": "bar"}).
Order(goqu.C("a").Asc())
sql, _, _ := ds.ToSQL()
fmt.Println(sql)
}
// result: UPDATE "test" SET "foo"='bar'
// expected: UPDATE "test" SET "foo"='bar' ORDER BY a ASCgolang version:
go version go1.25.0 darwin/arm64
goqu version:
github.com/doug-martin/goqu/v9 v9.19.0
Dialect:
- mysql
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels