doc/schema-fields: fix grammar errors (#1686)

This commit is contained in:
Ariel Mashraki
2021-07-04 13:18:30 +03:00
committed by GitHub
parent 55edc0012b
commit dbce277b68

View File

@@ -419,12 +419,12 @@ func (User) Fields() []ent.Field {
## Nillable
Sometimes you want to be able to distinguish between the zero value of fields
and `nil`; for example if the database column contains `0` or `NULL`.
and `nil`; for example, if the database column contains `0` or `NULL`.
The `Nillable` option exists exactly for this.
If you have an `Optional` field of type `T`, setting it to `Nillable` will generate
a struct field with type `*T`. Hence, if the database returns `NULL` for this field,
the struct field will be `nil`. Otherwise, it will contains a pointer to the actual data.
the struct field will be `nil`. Otherwise, it will contain a pointer to the actual data.
For example, given this schema:
```go