export

package
v2.2.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2020 License: AGPL-3.0 Imports: 21 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSameTableName = errors.New(`same table name`)

Functions

func CloseAllDBConn

func CloseAllDBConn()

func DBConn

func DBConn(dsn interface{}) (db sqlbuilder.Database, err error)

func Export

func Export(pageID uint, result *exec.Recv, collected echo.Store, noticeSender sender.Notice) error

Types

type Mapping

type Mapping struct {
	FromParent int    //如果大于0,则代表从上一层或上几层页面中取值
	FromTable  string //如果设置,则会从FromTable指定的“表的上一个插入操作”之后的结果集字段中取值
	FromField  string //来自结果集字段
	FromPipe   string //管道函数
	FromInput  string //输入框数据的原始内容
	ToTable    string //保存到表
	ToField    string //保存到字段
	ToInput    string //输入框数据的原始内容
}

func NewMapping

func NewMapping(fromInput, toInput string) (*Mapping, error)

type Mappings

type Mappings struct {
	TableKeys  map[string][]int
	Slice      []*Mapping
	TableNames []string
}

func NewMappings

func NewMappings() *Mappings

func (*Mappings) Add

func (m *Mappings) Add(mp *Mapping) *Mappings

func (*Mappings) Export

func (m *Mappings) Export(result *exec.Recv, data echo.Store, config *dbschema.NgingCollectorExport, noticeSender sender.Notice) error

Export 导出到数据库 result - 结果 data - 采集结果

func (*Mappings) Export2API

func (m *Mappings) Export2API(result *exec.Recv, data echo.Store, config *dbschema.NgingCollectorExport, noticeSender sender.Notice) error

Export2API 导出到WebAPI result - 结果 data - 本次采集结果

func (*Mappings) Export2DB

func (m *Mappings) Export2DB(result *exec.Recv, data echo.Store, config *dbschema.NgingCollectorExport, noticeSender sender.Notice) error

Export2DB 导出到数据库 result - 结果 data - 本次采集结果

func (*Mappings) String

func (m *Mappings) String() (string, error)

Jump to

Keyboard shortcuts

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