schema/field: json type support (#38)

Summary:
Pull Request resolved: https://github.com/facebookincubator/ent/pull/38

Only `IsNil` and `NotNil` predicates are supported this moment

Reviewed By: alexsn

Differential Revision: D17444976

fbshipit-source-id: 37336fa0bc7749af995933baee2e23bb7366dd78
This commit is contained in:
Ariel Mashraki
2019-09-19 04:58:21 -07:00
committed by Facebook Github Bot
parent 83d0063437
commit c3955a08f1
214 changed files with 4005 additions and 1296 deletions

View File

@@ -718,6 +718,11 @@ func (u *UpdateBuilder) Where(p *Predicate) *UpdateBuilder {
return u
}
// Empty reports whether this builder does not contain update changes.
func (u *UpdateBuilder) Empty() bool {
return len(u.columns) == 0 && len(u.nulls) == 0
}
// Query returns query representation of an `UPDATE` statement.
func (u *UpdateBuilder) Query() (string, []interface{}) {
u.b.WriteString("UPDATE ")