mirror of
https://github.com/ent/ent.git
synced 2026-05-02 07:30:53 +03:00
dialect/sql: change boolean operators wrapping (#678)
The reason is to parentheses only when it's necessary.
This commit is contained in:
@@ -36,7 +36,10 @@ func (d *SQLite) init(ctx context.Context, tx dialect.Tx) error {
|
||||
func (d *SQLite) tableExist(ctx context.Context, tx dialect.Tx, name string) (bool, error) {
|
||||
query, args := sql.Select().Count().
|
||||
From(sql.Table("sqlite_master")).
|
||||
Where(sql.EQ("type", "table").And().EQ("name", name)).
|
||||
Where(sql.And(
|
||||
sql.EQ("type", "table"),
|
||||
sql.EQ("name", name),
|
||||
)).
|
||||
Query()
|
||||
return exist(ctx, tx, query, args...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user