mysql

package
v0.0.0-...-895cc19 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Layout

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

Layout mysql table layout definition

func GenerateLayout

func GenerateLayout(measurement, tagsStr, fieldsStr string) (Layout, error)

GenerateLayout generate a new layout

func (*Layout) GenInsertStmtValues

func (l *Layout) GenInsertStmtValues(colVals []string) string

GenInsertStmtValues generate insert row DML

func (*Layout) GetCreateStmt

func (l *Layout) GetCreateStmt() string

GetCreateStmt get create table DDL

type Row

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

Row mysql table row

func (*Row) AppendCol

func (r *Row) AppendCol(c interface{})

AppendCol append column data

func (*Row) GetColVals

func (r *Row) GetColVals() []string

GetColVals return column values via string

type TableChunk

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

TableChunk table data chunk struct

func NewTableChunk

func NewTableChunk(layout Layout, batchSize uint64) TableChunk

NewTableChunk generate batch rows

func (*TableChunk) GenInsertStmt

func (t *TableChunk) GenInsertStmt() string

GenInsertStmt get statement of insertion all rows

func (*TableChunk) GetRowsNum

func (t *TableChunk) GetRowsNum() uint64

GetRowsNum get number of rows

func (*TableChunk) Update

func (t *TableChunk) Update()

Update update table data

Jump to

Keyboard shortcuts

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