bulk

package
v0.0.0-...-3e091c9 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bulk

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

func NewBulk

func NewBulk(db *sql.DB, columns []string, schema string, tableName string, rowCount int, maxRowTxCommit int) (r *Bulk, err error)

func (*Bulk) Append

func (r *Bulk) Append(rows *sql.Rows) (err error)

Appends row values to internal buffer

func (*Bulk) Close

func (r *Bulk) Close() (err error)

Closes any prepared statements

func (*Bulk) Flush

func (r *Bulk) Flush() (totalRowCount int, err error)

Writes any unsaved values from buffer to database

type CopyIn

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

func NewCopyIn

func NewCopyIn(db *sql.DB, columns []string, schema string, tableName string) (r *CopyIn, err error)

func (*CopyIn) Append

func (r *CopyIn) Append(rows *sql.Rows) (err error)

Appends row values to internal buffer

func (*CopyIn) Close

func (r *CopyIn) Close() (err error)

Closes any prepared statements

func (*CopyIn) Flush

func (r *CopyIn) Flush() (totalRowCount int, err error)

Jump to

Keyboard shortcuts

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