data

package
v0.0.0-...-a11b62f Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnQuote

func UnQuote(s []string) (d []string)

UnQuote ConvertFunc 删除字符串的引号

Types

type ConvertFunc

type ConvertFunc func([]string) []string

ConvertFunc 转换函数

func Exclude

func Exclude(columns ...int) ConvertFunc

Exclude ConvertFunc 剔除指定的列

func Include

func Include(columns ...int) ConvertFunc

Include ConvertFunc 仅包含指定的列

type ConvertReader

type ConvertReader struct {
	Reader
	// contains filtered or unexported fields
}

ConvertReader 带通道的数据读取

func NewConvertReader

func NewConvertReader(r Reader, converters ...ConvertFunc) *ConvertReader

NewConvertReader DReader 构造函数

func (*ConvertReader) ReadAll

func (r *ConvertReader) ReadAll(d text.Data)

ReadAll 读取所有数据

type Data

type Data struct {
	*sync.WaitGroup // 进程控制
	// contains filtered or unexported fields
}

Data 数据传输

func NewData

func NewData() *Data

NewData 构造函数

func (*Data) Close

func (d *Data) Close()

Close 关闭数据通道

func (*Data) Exec

func (d *Data) Exec(tx *sqlite3.Tx, sql string) (err error)

Exec 执行 SQL 语句 Deprecated: No longer used.

func (*Data) Printf

func (d *Data) Printf(format string)

Printf 打印通道中的数据

func (*Data) Println

func (d *Data) Println()

Println 打印通道中的数据

func (*Data) ReadCh

func (d *Data) ReadCh() <-chan []interface{}

ReadCh 读取数据通道

func (*Data) Write

func (d *Data) Write(data ...interface{})

Write 向通道中写入数据

func (*Data) WriteCh

func (d *Data) WriteCh() chan<- []interface{}

WriteCh 读取数据通道

type Reader

type Reader interface {
	Next() bool
	Read() []string
}

Reader 数据读取接口

func NewXlsReader

func NewXlsReader(filename string, sheet int, skip int) Reader

NewXlsReader 读取 Excel 文件

type XlsReader

type XlsReader struct {
	Sheet   *xls.WorkSheet
	CurLine uint16
}

XlsReader Excel 文件读取

func (*XlsReader) Next

func (s *XlsReader) Next() bool

Next 判断是否还有数据

func (*XlsReader) Read

func (s *XlsReader) Read() (res []string)

Read 读取当前记录

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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