Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //ErrEmptyTableName means table's name is empty ErrEmptyTableName = errors.New("empty table name") //ErrEmptyTableNamePart means there are empty table's name's part. E.g., "db..name", "db.", "db.name."" ErrEmptyTableNamePart = errors.New("empty table name part") //ErrTableNameInvalidBacktick means there is no closing/opening backtick it table's name ErrTableNameInvalidBacktick = errors.New("table name has invalid backtick") //ErrEmptyFields means fields are empty ErrEmptyFields = errors.New("empty fields") //ErrEmptyField one of fields is empty ("field1,,field2") ErrEmptyField = errors.New("fields contain empty field (check commas)") //ErrFieldInvalidBacktick means there is no closing/opening backtick it fields ErrFieldInvalidBacktick = errors.New("one of the fields has invalid backtick") )
View Source
var ErrWrongRowLen = errors.New("")
ErrWrongRowLen - when row elements count doesn't match table's fields count
Functions ¶
This section is empty.
Types ¶
type Signature ¶
type Signature struct {
// contains filtered or unexported fields
}
Signature is table's name and fields
func NewSignature ¶
NewSignature creates new TableSignature from name and fields
type Table ¶
type Table struct { Signature // contains filtered or unexported fields }
Table is an abstract table that has name, fields and it's data (rows)
func (*Table) AppendRows ¶
AppendRows parses rowsJSON as [][]interface{}, validates and appends to table's inner data buffer
func (*Table) GetNextRow ¶
func (t *Table) GetNextRow() []interface{}
GetNextRow iterates over table's data buffer and returns each row. When the end of data is reached returns nil and reset's inner iteration position.
func (*Table) GetRawData ¶
func (t *Table) GetRawData() []interface{}
Click to show internal directories.
Click to hide internal directories.