Documentation ¶
Index ¶
- type Field
- func (f Field) Child(i int) Field
- func (f Field) Copy() Field
- func (f Field) DefIndex(def int) int
- func (f Field) Init(def, rep int) string
- func (f Field) MaxDef() int
- func (f Field) MaxRep() int
- func (f Field) NilField(n int) (string, RepetitionType, int, int)
- func (f Field) Optional() bool
- func (f Field) Parent(i int) Field
- func (f Field) Path() string
- func (f Field) RepCases(seen RepetitionTypes) []RepCase
- func (f Field) Repeated() bool
- func (f Field) Required() bool
- type RepCase
- type RepetitionType
- type RepetitionTypes
- func (r RepetitionTypes) Def(def int) RepetitionType
- func (r RepetitionTypes) MaxDef() uint8
- func (r RepetitionTypes) MaxRep() uint8
- func (r RepetitionTypes) NRepeated(i int) bool
- func (r RepetitionTypes) Optional() bool
- func (r RepetitionTypes) Repeated() bool
- func (r RepetitionTypes) Required() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field struct { Type string RepetitionTypes RepetitionTypes FieldNames []string ColumnNames []string FieldTypes []string Seen RepetitionTypes TypeName string FieldType string ParquetType string Category string }
func (Field) NilField ¶
NilField finds the nth field that is optional and returns some information about it.
func (Field) RepCases ¶
func (f Field) RepCases(seen RepetitionTypes) []RepCase
RepCases returns a RepCase slice based on the field types and what sub-fields have already been seen.
type RepetitionType ¶
type RepetitionType int
const ( Unseen RepetitionType = -1 Required RepetitionType = 0 Optional RepetitionType = 1 Repeated RepetitionType = 2 )
func Seen ¶ added in v0.3.4
func Seen(i int, flds []Field) []RepetitionType
Seen counts how many sub-fields have been previously processed so that some of the cases and if statements can be skipped when re-assembling records
type RepetitionTypes ¶
type RepetitionTypes []RepetitionType
func (RepetitionTypes) Def ¶ added in v0.3.4
func (r RepetitionTypes) Def(def int) RepetitionType
Def returns the repetition type for the definition level
func (RepetitionTypes) MaxDef ¶
func (r RepetitionTypes) MaxDef() uint8
MaxDef returns the largest definition level
func (RepetitionTypes) MaxRep ¶
func (r RepetitionTypes) MaxRep() uint8
MaxDef returns the largest repetition level
func (RepetitionTypes) NRepeated ¶ added in v0.3.4
func (r RepetitionTypes) NRepeated(i int) bool
NRepeated figures out if the sub-field at position i is repeated.
func (RepetitionTypes) Optional ¶ added in v0.3.4
func (r RepetitionTypes) Optional() bool
Optional figures out if there is an optional field
func (RepetitionTypes) Repeated ¶ added in v0.3.4
func (r RepetitionTypes) Repeated() bool
Repeated figures out if there is a repeated field
func (RepetitionTypes) Required ¶ added in v0.3.4
func (r RepetitionTypes) Required() bool
Required figures out if there are no optional or repeated fields