Documentation
¶
Overview ¶
Package types contains the implementation of the Mlrval datatype which is used for record values, as well as expression/variable values in the Miller put/filter DSL.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEndOfStreamMarkerList ¶
TODO: comment For the record-readers to update their initial context as each new record is read.
Types ¶
type Context ¶
type Context struct { FILENAME string FILENUM int64 // This is computed dynammically from the current record's field-count // NF int NR int64 FNR int64 // XXX 1513 JSONHadBrackets bool }
----------------------------------------------------------------
func NewContext ¶
func NewContext() *Context
TODO: comment: Remember command-line values to pass along to CST evaluators. The options struct-pointer can be nil when invoked by non-DSL verbs such as join or seqgen.
func NewNilContext ¶
func NewNilContext() *Context
TODO: comment: Remember command-line values to pass along to CST evaluators. The options struct-pointer can be nil when invoked by non-DSL verbs such as join or seqgen.
func (*Context) GetStatusString ¶
func (*Context) UpdateForInputRecord ¶
func (context *Context) UpdateForInputRecord()
For the record-readers to update their initial context as each new record is read.
func (*Context) UpdateForStartOfFile ¶
For the record-readers to update their initial context as each new file is opened.
type RecordAndContext ¶
type RecordAndContext struct { Record *mlrval.Mlrmap Context Context OutputString string EndOfStream bool }
func NewEndOfStreamMarker ¶
func NewEndOfStreamMarker(context *Context) *RecordAndContext
For the record-readers to update their initial context as each new record is read.
func NewOutputString ¶
func NewOutputString( outputString string, context *Context, ) *RecordAndContext
For print/dump/etc to insert strings sequenced into the record-output stream. This avoids race conditions between different goroutines printing to stdout: we have a single designated goroutine printing to stdout. This makes output more predictable and intuitive for users; it also makes our regression tests run reliably the same each time.
func NewRecordAndContext ¶
func NewRecordAndContext( record *mlrval.Mlrmap, context *Context, ) *RecordAndContext
func (*RecordAndContext) Copy ¶
func (rac *RecordAndContext) Copy() *RecordAndContext
For the record-readers to update their initial context as each new record is read.
type TypeGatedMlrvalName ¶
----------------------------------------------------------------
func NewTypeGatedMlrvalName ¶
func NewTypeGatedMlrvalName( name string, typeName string, ) (*TypeGatedMlrvalName, error)
type TypeGatedMlrvalVariable ¶
type TypeGatedMlrvalVariable struct {
// contains filtered or unexported fields
}
----------------------------------------------------------------
func (*TypeGatedMlrvalVariable) Assign ¶
func (tvar *TypeGatedMlrvalVariable) Assign(value *mlrval.Mlrval) error
func (*TypeGatedMlrvalVariable) GetName ¶
func (tvar *TypeGatedMlrvalVariable) GetName() string
func (*TypeGatedMlrvalVariable) GetValue ¶
func (tvar *TypeGatedMlrvalVariable) GetValue() *mlrval.Mlrval
func (*TypeGatedMlrvalVariable) Unassign ¶
func (tvar *TypeGatedMlrvalVariable) Unassign()
func (*TypeGatedMlrvalVariable) ValueString ¶
func (tvar *TypeGatedMlrvalVariable) ValueString() string