Documentation
¶
Index ¶
- Constants
- Variables
- func GetVectorArrayLen(ctx context.Context, vec *vector.Vector) (int, error)
- func Time2DatetimeString(t time.Time) string
- func ValToString(ctx context.Context, vec *vector.Vector, rowIdx int) (string, error)
- type CSVWriter
- type FSWriter
- type FSWriterOption
- type TAEReader
- type TAEWriter
Constants ¶
View Source
const BatchSize = 8192
Variables ¶
View Source
var QuoteFieldFunc = func(ctx context.Context, buf *bytes.Buffer, value string, enclose rune) string { replaceRules := map[rune]string{ '"': `""`, '\'': `\'`, } quotedClose, hasRule := replaceRules[enclose] if !hasRule { panic(moerr.NewInternalError(ctx, "not support csv enclose: %c", enclose)) } for _, c := range value { if c == enclose { buf.WriteString(quotedClose) } else { buf.WriteRune(c) } } return value }
Functions ¶
func GetVectorArrayLen ¶
func Time2DatetimeString ¶
Types ¶
type CSVWriter ¶
type CSVWriter struct {
// contains filtered or unexported fields
}
func NewCSVWriter ¶
func (*CSVWriter) FlushAndClose ¶
func (*CSVWriter) GetContent ¶
func (*CSVWriter) WriteStrings ¶
type FSWriter ¶
type FSWriter struct {
// contains filtered or unexported fields
}
func NewFSWriter ¶
func NewFSWriter(ctx context.Context, fs fileservice.FileService, opts ...FSWriterOption) *FSWriter
type FSWriterOption ¶
type FSWriterOption func(*FSWriter)
func WithFilePath ¶
func WithFilePath(filepath string) FSWriterOption
func (FSWriterOption) Apply ¶
func (f FSWriterOption) Apply(w *FSWriter)
type TAEReader ¶
type TAEReader struct {
// contains filtered or unexported fields
}
func NewTaeReader ¶
type TAEWriter ¶
type TAEWriter struct {
// contains filtered or unexported fields
}
func NewTAEWriter ¶
func NewTAEWriter(ctx context.Context, tbl *table.Table, mp *mpool.MPool, filePath string, fs fileservice.FileService) *TAEWriter
func (*TAEWriter) FlushAndClose ¶
FlushAndClose implement ETLWriter
func (*TAEWriter) GetContent ¶
func (*TAEWriter) WriteStrings ¶
WriteStrings implement ETLWriter
Click to show internal directories.
Click to hide internal directories.