Properly set the multivalue flag on frame columns
This commit is contained in:
committed by
Jože Fortun
parent
99f6503226
commit
734bd2c21f
@@ -44,13 +44,15 @@ type (
|
||||
|
||||
// MapProperties describe the attribute such as it's type and constraints
|
||||
MapProperties struct {
|
||||
Label string
|
||||
IsPrimary bool
|
||||
IsSystem bool
|
||||
IsFilterable bool
|
||||
IsSortable bool
|
||||
Nullable bool
|
||||
Type Type
|
||||
Label string
|
||||
IsPrimary bool
|
||||
IsSystem bool
|
||||
IsFilterable bool
|
||||
IsSortable bool
|
||||
IsMultivalue bool
|
||||
MultivalueDelimiter string
|
||||
Nullable bool
|
||||
Type Type
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -397,8 +397,13 @@ func mappingToFrameCol(m dal.AttributeMapping) FrameColumn {
|
||||
Label: l,
|
||||
Kind: "String",
|
||||
|
||||
Primary: p.IsPrimary,
|
||||
System: p.IsSystem,
|
||||
Primary: p.IsPrimary,
|
||||
System: p.IsSystem,
|
||||
Multivalue: p.IsMultivalue,
|
||||
MultivalueDelimiter: p.MultivalueDelimiter,
|
||||
}
|
||||
if out.MultivalueDelimiter == "" {
|
||||
out.MultivalueDelimiter = "\n"
|
||||
}
|
||||
|
||||
switch t := p.Type.(type) {
|
||||
@@ -710,6 +715,9 @@ func attrToMapping(aa ...*dal.Attribute) (out []dal.AttributeMapping) {
|
||||
IsSystem: a.System,
|
||||
Nullable: a.Type.IsNullable(),
|
||||
IsPrimary: a.PrimaryKey,
|
||||
// @todo add multi value delimiter; it's currently not set on the
|
||||
// attribute so we might need to rethink this a bit
|
||||
IsMultivalue: a.MultiValue,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user