table

package
v0.0.0-...-1743342 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2015 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Overview

manage rows of a table

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keys

type Keys []string

func (Keys) Len

func (k Keys) Len() int

func (Keys) Less

func (k Keys) Less(i, j int) bool

func (Keys) Swap

func (k Keys) Swap(i, j int)

type Row

type Row struct {
	// contains filtered or unexported fields
}

func (Row) InsertStatement

func (r Row) InsertStatement(table_name string)

func (Row) IsEmpty

func (r Row) IsEmpty() bool

IsEmpty returns true if all fields in the row are empty.

func (*Row) Merge

func (r *Row) Merge(r2 Row)

Merge values together overwriting blank fields

func (Row) Print

func (r Row) Print()

func (*Row) SetCmdLine

func (r *Row) SetCmdLine(name string)

func (*Row) SetDynamic

func (r *Row) SetDynamic(name string)

func (*Row) SetOptionFile

func (r *Row) SetOptionFile(name string)

func (*Row) SetSystemVar

func (r *Row) SetSystemVar(name string)

func (*Row) SetSystemVariableName

func (r *Row) SetSystemVariableName(name string)

func (*Row) SetVarScope

func (r *Row) SetVarScope(name string)

type Table

type Table struct {
	// contains filtered or unexported fields
}

func NewTable

func NewTable(name string) *Table

create a new table with the given name

func (*Table) AppendRow

func (t *Table) AppendRow(row Row)

AppendRow Appends a row to the table if the variable name has not been seen. If it has then it will check if the values are the identical and do nothing.

func (Table) CreateTableStatement

func (t Table) CreateTableStatement()

generate a create table statement, currently hard-coded

func (Table) InsertStatements

func (t Table) InsertStatements()

create the INSERT statements for the rows in the table

func (Table) MysqlDump

func (t Table) MysqlDump()

Generate the equivalent of a mysqldump <db> <table>.

func (Table) MysqlDumpFromSysvars

func (t Table) MysqlDumpFromSysvars(types, cmdlines, scopes, defaults, dynamics sysvar.Types)

do a mysql dump from the collected sysvar info

func (Table) Print

func (t Table) Print()

Print the contents of the rows in the table.

func (Table) Rows

func (t Table) Rows() int

return the number of rows in the table

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL