writer

package
v0.0.0-...-5d9beea Latest Latest
Warning

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

Go to latest
Published: May 31, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColumnDef

type ColumnDef struct {
	ColumnName  string
	BindingName string
	Value       interface{}
}

type DBCommand

type DBCommand struct {
	QueryStr string
	Args     map[string]interface{}
}

type DatabaseInfo

type DatabaseInfo struct {
	ProjectID  string `json:"projectid"`
	InstanceID string `json:"instanceid"`
}

type RecordDef

type RecordDef struct {
	HasPrimary    bool
	PrimaryColumn string
	Values        map[string]interface{}
	ColumnDefs    []*ColumnDef
}

type Writer

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

func NewWriter

func NewWriter() *Writer

func (*Writer) DeleteRecord

func (writer *Writer) DeleteRecord(record *transmitter.Record) error

func (*Writer) GetDefinition

func (writer *Writer) GetDefinition(record *transmitter.Record) *RecordDef

func (*Writer) GetValue

func (writer *Writer) GetValue(value *transmitter.Value) interface{}

func (*Writer) Init

func (writer *Writer) Init() error

func (*Writer) InsertRecord

func (writer *Writer) InsertRecord(record *transmitter.Record) error

func (*Writer) ProcessData

func (writer *Writer) ProcessData(record *transmitter.Record) error

func (*Writer) Truncate

func (writer *Writer) Truncate(table string) error

func (*Writer) UpdateRecord

func (writer *Writer) UpdateRecord(record *transmitter.Record) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳