mirror of
https://github.com/ent/ent.git
synced 2026-05-02 07:30:53 +03:00
dialect/sql: add support for LIMIT in update statement (#3018)
This commit is contained in:
@@ -328,8 +328,8 @@ func TestBuilder(t *testing.T) {
|
||||
wantArgs: []any{"foo", 10},
|
||||
},
|
||||
{
|
||||
input: Dialect(dialect.SQLite).Update("users").Set("name", "foo").Returning("id", "name"),
|
||||
wantQuery: "UPDATE `users` SET `name` = ? RETURNING `id`, `name`",
|
||||
input: Dialect(dialect.SQLite).Update("users").Set("name", "foo").Returning("id", "name").OrderBy("name").Limit(10),
|
||||
wantQuery: "UPDATE `users` SET `name` = ? RETURNING `id`, `name` ORDER BY `name` LIMIT 10",
|
||||
wantArgs: []any{"foo"},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user