Skip to content

Commit 40fe0d3

Browse files
committed
schema: add IsNullable flag to Field
1 parent acedf56 commit 40fe0d3

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

schema.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,10 @@ func (space *Space) DecodeMsgpack(d *msgpack.Decoder) error {
153153

154154
// Field is a schema field.
155155
type Field struct {
156-
Id uint32
157-
Name string
158-
Type string
156+
Id uint32
157+
Name string
158+
Type string
159+
IsNullable bool
159160
}
160161

161162
func (field *Field) DecodeMsgpack(d *msgpack.Decoder) error {
@@ -177,6 +178,10 @@ func (field *Field) DecodeMsgpack(d *msgpack.Decoder) error {
177178
if field.Type, err = d.DecodeString(); err != nil {
178179
return err
179180
}
181+
case "is_nullable":
182+
if field.IsNullable, err = d.DecodeBool(); err != nil {
183+
return err
184+
}
180185
default:
181186
if err := d.Skip(); err != nil {
182187
return err

0 commit comments

Comments
 (0)