Documentation ¶
Overview ¶
Package untyped provides helper functions for working with untyped table data. Untyped tables treat all fields as strings
Index ¶
- func NewRowFromStrings(nbf *types.NomsBinFormat, sch schema.Schema, valStrs []string) (row.Row, error)
- func NewRowFromTaggedStrings(nbf *types.NomsBinFormat, sch schema.Schema, taggedStrs map[uint64]string) (row.Row, error)
- func NewUntypedSchema(colNames ...string) (map[string]uint64, schema.Schema)
- func NewUntypedSchemaWithFirstTag(firstTag uint64, colNames ...string) (map[string]uint64, schema.Schema)
- func UnkeySchema(sch schema.Schema) (schema.Schema, error)
- func UntypeSchema(sch schema.Schema) (schema.Schema, error)
- func UntypeUnkeySchema(sch schema.Schema) (schema.Schema, error)
- func UntypedSchemaUnion(schemas ...schema.Schema) (schema.Schema, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRowFromStrings ¶
func NewRowFromStrings(nbf *types.NomsBinFormat, sch schema.Schema, valStrs []string) (row.Row, error)
NewRowFromStrings is a utility method that takes a schema for an untyped row, and a slice of strings and uses the strings as the field values for the row by converting them to noms type.String
func NewRowFromTaggedStrings ¶
func NewRowFromTaggedStrings(nbf *types.NomsBinFormat, sch schema.Schema, taggedStrs map[uint64]string) (row.Row, error)
NewRowFromTaggedStrings takes an untyped schema and a map of column tag to string value and returns a row
func NewUntypedSchema ¶
NewUntypedSchema takes an array of field names and returns a schema where the fields use the provided names, are of kind types.StringKind, and are not required.
func UnkeySchema ¶
UnkeySchema takes a schema and returns a schema with the same columns and types, but stripped of constraints and primary keys. Meant for use in result sets.
func UntypeSchema ¶
UntypeSchema takes a schema and returns a schema with the same columns, but with the types of each of those columns as types.StringKind
func UntypeUnkeySchema ¶
UntypeUnkeySchema takes a schema and returns a schema with the same columns, but stripped of constraints and primary keys and using only string types. Meant for displaying output and tests.
func UntypedSchemaUnion ¶
UntypedSchemaUnion takes an arbitrary number of schemas and provides the union of all of their key and non-key columns. The columns will all be of type types.StringKind and and IsPartOfPK will be false for every column, and all of the columns will be in the schemas non-key ColumnCollection. Columns that share tags must have compatible types.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package csv provides TableReadCloser and TableWriteCloser implementations for working with csvs.
|
Package csv provides TableReadCloser and TableWriteCloser implementations for working with csvs. |
Package tabular provides writer implementations for working with tabular output for display
|
Package tabular provides writer implementations for working with tabular output for display |