load

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

This section is empty.

Types

type Loader

type Loader struct {
	Name     string
	FileInfo os.FileInfo

	Clear bool // 是否清除数据库,默认清理
	Check bool // 是否检查重复导入,默认检查
	// contains filtered or unexported fields
}

Loader 数据导入模型

func NewLoader

func NewLoader(name string, fileInfo os.FileInfo, ver string, txt Reader, initSQL string, loadSQL string) *Loader

NewLoader 构造函数

func (*Loader) Exec

func (l *Loader) Exec(tx *sqlite3.Tx) (err error)

Exec 执行导入操作

func (*Loader) Load

func (l *Loader) Load()

Load 导入数据

func (*Loader) Test

func (l *Loader) Test()

Test 执行测试

type Reader

type Reader interface {
	ReadAll(text.Data)
}

Reader 读取数据

Jump to

Keyboard shortcuts

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