mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-06 19:07:50 +00:00
remove some code duplication in IndexOptions
This commit is contained in:
parent
80603ef28a
commit
c8c2229ca3
2 changed files with 5 additions and 7 deletions
4
frame.go
4
frame.go
|
|
@ -924,10 +924,10 @@ func encodeFrames(a []*Frame) []*internal.Frame {
|
|||
|
||||
// encodeFrame converts f into its internal representation.
|
||||
func encodeFrame(f *Frame) *internal.Frame {
|
||||
options := f.Options()
|
||||
fo := f.options()
|
||||
return &internal.Frame{
|
||||
Name: f.name,
|
||||
Meta: options.Encode(),
|
||||
Meta: fo.Encode(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
8
index.go
8
index.go
|
|
@ -614,12 +614,10 @@ func EncodeIndexes(a []*Index) []*internal.Index {
|
|||
|
||||
// encodeIndex converts d into its internal representation.
|
||||
func encodeIndex(d *Index) *internal.Index {
|
||||
io := d.options()
|
||||
return &internal.Index{
|
||||
Name: d.name,
|
||||
Meta: &internal.IndexMeta{
|
||||
ColumnLabel: d.columnLabel,
|
||||
TimeQuantum: string(d.timeQuantum),
|
||||
},
|
||||
Name: d.name,
|
||||
Meta: io.Encode(),
|
||||
MaxSlice: d.MaxSlice(),
|
||||
Frames: encodeFrames(d.Frames()),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue