Documentation ¶
Overview ¶
Implements INSERTS output for exported rows e.g. INSERT INTO <table> (name, last_name, something);
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CsvFormat ¶
type CsvFormat struct {
// contains filtered or unexported fields
}
func (*CsvFormat) WriteHeader ¶
type DataFormat ¶
type DataFormat interface { WriteHeader(columns []string) error WriteRow(map[string]interface{}) error Flush() error }
Supports storing data in different formats
type InsertsFormat ¶
type InsertsFormat struct { DataFormat // contains filtered or unexported fields }
func NewInsertsFormat ¶
func (*InsertsFormat) Flush ¶
func (f *InsertsFormat) Flush() error
func (*InsertsFormat) WriteHeader ¶
func (f *InsertsFormat) WriteHeader(columns []string) error
func (*InsertsFormat) WriteRow ¶
func (f *InsertsFormat) WriteRow(values map[string]interface{}) error
type JSONArrayFormat ¶
type JSONArrayFormat struct {
// contains filtered or unexported fields
}
func NewJSONArrayFormat ¶
func NewJSONArrayFormat(w io.Writer) *JSONArrayFormat
func (*JSONArrayFormat) Flush ¶
func (e *JSONArrayFormat) Flush() error
func (*JSONArrayFormat) WriteHeader ¶
func (e *JSONArrayFormat) WriteHeader(columns []string) error
Writing header for JSON is a NOP
func (*JSONArrayFormat) WriteRow ¶
func (e *JSONArrayFormat) WriteRow(rows map[string]interface{}) error
type JSONLinesFormat ¶
type JSONLinesFormat struct {
// contains filtered or unexported fields
}
func NewJSONLinesFormat ¶
func NewJSONLinesFormat(w io.Writer) *JSONLinesFormat
func (*JSONLinesFormat) Flush ¶
func (e *JSONLinesFormat) Flush() error
func (*JSONLinesFormat) WriteHeader ¶
func (e *JSONLinesFormat) WriteHeader(columns []string) error
Writing header for JSON is a NOP
func (*JSONLinesFormat) WriteRow ¶
func (e *JSONLinesFormat) WriteRow(rows map[string]interface{}) error
type TemplateFormat ¶
type TemplateFormat struct {
// contains filtered or unexported fields
}
func NewTemplateFormat ¶
func NewTemplateFormat(w io.Writer, rawTemplate string) *TemplateFormat
func (*TemplateFormat) Flush ¶
func (e *TemplateFormat) Flush() error
func (*TemplateFormat) WriteHeader ¶
func (e *TemplateFormat) WriteHeader(columns []string) error
func (*TemplateFormat) WriteRow ¶
func (e *TemplateFormat) WriteRow(values map[string]interface{}) error
type XMLFormat ¶
type XMLFormat struct {
// contains filtered or unexported fields
}
func NewXMLFormat ¶
func (*XMLFormat) WriteHeader ¶
Writing header for XML is a NOP
type XlsxFormat ¶
type XlsxFormat struct {
// contains filtered or unexported fields
}
func NewXlsxFormat ¶
func NewXlsxFormat(fileName string, sheetName string) (*XlsxFormat, error)
func (*XlsxFormat) Flush ¶
func (f *XlsxFormat) Flush() error
func (*XlsxFormat) WriteHeader ¶
func (f *XlsxFormat) WriteHeader(columns []string) error
func (*XlsxFormat) WriteRow ¶
func (f *XlsxFormat) WriteRow(values map[string]interface{}) error
Click to show internal directories.
Click to hide internal directories.