sql

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OutputFormatter

type OutputFormatter struct {
	TableName string
	UseUpsert bool
	// if 0, output all rows as a single INSERT statement, otherwise make a new statement every n rows
	SplitByRows int
	// contains filtered or unexported fields
}

func NewOutputFormatter

func NewOutputFormatter(opts ...OutputFormatterOption) *OutputFormatter

func (*OutputFormatter) Close

func (f *OutputFormatter) Close(ctx context.Context, w io.Writer) error

func (*OutputFormatter) ContentType

func (f *OutputFormatter) ContentType() string

func (*OutputFormatter) OutputRow

func (f *OutputFormatter) OutputRow(ctx context.Context, row types.Row, w io.Writer) error

func (*OutputFormatter) RegisterRowMiddlewares

func (f *OutputFormatter) RegisterRowMiddlewares(mw *middlewares.TableProcessor) error

func (*OutputFormatter) RegisterTableMiddlewares

func (f *OutputFormatter) RegisterTableMiddlewares(mw *middlewares.TableProcessor) error

type OutputFormatterOption

type OutputFormatterOption func(*OutputFormatter)

func WithSplitByRows

func WithSplitByRows(splitByRows int) OutputFormatterOption

func WithTableName

func WithTableName(tableName string) OutputFormatterOption

func WithUseUpsert

func WithUseUpsert(useUpsert bool) OutputFormatterOption

Jump to

Keyboard shortcuts

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