mirror of
https://github.com/ent/ent.git
synced 2026-05-28 09:49:08 +03:00
entc: support schema/blob annotation
This commit is contained in:
@@ -660,6 +660,13 @@ func (b *bytesBuilder) Optional() *bytesBuilder {
|
||||
return b
|
||||
}
|
||||
|
||||
// Blob indicates that this field stores its data in external blob storage
|
||||
// rather than in the database. Blob fields have no SQL column.
|
||||
func (b *bytesBuilder) Blob() *bytesBuilder {
|
||||
b.desc.Blob = true
|
||||
return b
|
||||
}
|
||||
|
||||
// Sensitive fields not printable and not serializable.
|
||||
func (b *bytesBuilder) Sensitive() *bytesBuilder {
|
||||
b.desc.Sensitive = true
|
||||
@@ -1439,6 +1446,7 @@ type Descriptor struct {
|
||||
Comment string // field comment.
|
||||
Deprecated bool // mark the field as deprecated.
|
||||
DeprecatedReason string // deprecation reason.
|
||||
Blob bool // field is stored in external blob storage.
|
||||
Err error
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user