load

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildSQL

func BuildSQL(config *csv.Config, readerID, tableName string, columns []io.Column, options ...loption.Option) string

BuildSQL builds "LOAD DATA" statement

func NewSession

func NewSession(dialect *info.Dialect) io.LoadExecutor

NewSession returns new MySQL session

Types

type Session

type Session struct {
	*io.Transaction

	loption.Options
	// contains filtered or unexported fields
}

Session represents MySQL session

func (*Session) Exec

func (s *Session) Exec(ctx context.Context, data interface{}, db *sql.DB, tableName string, options ...loption.Option) (sql.Result, error)

Exec inserts given data to database using "LOAD DATA LOCAL INFILE" note: local_infile=1 must be enabled on database

Jump to

Keyboard shortcuts

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