Documentation
¶
Index ¶
- Constants
- func GetVectorArrayLen(ctx context.Context, vec *vector.Vector) (int, error)
- func ValToString(ctx context.Context, vec *vector.Vector, rowIdx int) (string, error)
- type BufWriter
- type CSVWriter
- func (w *CSVWriter) FlushAndClose() (int, error)
- func (w *CSVWriter) FlushBuffer(buf *bytes.Buffer) (int, error)
- func (w *CSVWriter) GetContent() string
- func (w *CSVWriter) GetContentLength() int
- func (w *CSVWriter) WriteRow(row *table.Row) error
- func (w *CSVWriter) WriteStrings(record []string) error
- type ContentFormatter
- type ContentWriter
- func (c *ContentWriter) FlushAndClose() (n int, err error)
- func (c *ContentWriter) GetContent() string
- func (c *ContentWriter) GetContentLength() int
- func (c *ContentWriter) NeedBuffer() bool
- func (c *ContentWriter) SetBuffer(buf *bytes.Buffer, callback func(buffer *bytes.Buffer))
- func (c *ContentWriter) SetupBackOff(backoff table.BackOff)
- func (c *ContentWriter) WriteRow(row *table.Row) error
- type DefaultSqlWriter
- type FSWriter
- type FSWriterOption
- type FileFlusher
- type Formatter
- type SQLFlusher
- type TAEReader
- type TAEWriter
Constants ¶
const ETLMergeTask = "ETLMergeTask"
ETLMergeTask name for cron task in mo_task.sys_cron_task
const MAX_INSERT_TIME = 3 * time.Second
Variables ¶
This section is empty.
Functions ¶
func GetVectorArrayLen ¶
Types ¶
type BufWriter ¶ added in v0.8.0
type BufWriter struct {
// contains filtered or unexported fields
}
func NewBufWriter ¶ added in v0.8.0
type CSVWriter ¶
type CSVWriter struct {
// contains filtered or unexported fields
}
func NewCSVWriter ¶
func NewCSVWriter(ctx context.Context, writer io.StringWriter) *CSVWriter
func (*CSVWriter) FlushAndClose ¶
func (*CSVWriter) FlushBuffer ¶
FlushBuffer flush the input buf content into file. The writer should NOT call function WriteRow, WriteStrings, FlushAndClose.
func (*CSVWriter) GetContent ¶
func (*CSVWriter) GetContentLength ¶
func (*CSVWriter) WriteStrings ¶
type ContentFormatter ¶
type ContentFormatter struct {
Formatter
}
ContentFormatter common File Format
type ContentWriter ¶
type ContentWriter struct {
// contains filtered or unexported fields
}
ContentWriter NO do gen op, just do the flush op.
func NewContentWriter ¶
func (*ContentWriter) FlushAndClose ¶
func (c *ContentWriter) FlushAndClose() (n int, err error)
func (*ContentWriter) GetContent ¶
func (c *ContentWriter) GetContent() string
func (*ContentWriter) GetContentLength ¶
func (c *ContentWriter) GetContentLength() int
func (*ContentWriter) NeedBuffer ¶
func (c *ContentWriter) NeedBuffer() bool
NeedBuffer implements table.BufferSettable
func (*ContentWriter) SetBuffer ¶
func (c *ContentWriter) SetBuffer(buf *bytes.Buffer, callback func(buffer *bytes.Buffer))
SetBuffer implements table.BufferSettable
func (*ContentWriter) SetupBackOff ¶
func (c *ContentWriter) SetupBackOff(backoff table.BackOff)
type DefaultSqlWriter ¶ added in v0.8.0
type DefaultSqlWriter struct {
// contains filtered or unexported fields
}
DefaultSqlWriter SqlWriter is a writer that writes data to a SQL database.
func NewSqlWriter ¶ added in v0.8.0
func (*DefaultSqlWriter) FlushAndClose ¶ added in v0.8.0
func (sw *DefaultSqlWriter) FlushAndClose() (int, error)
func (*DefaultSqlWriter) GetContent ¶ added in v0.8.0
func (sw *DefaultSqlWriter) GetContent() string
func (*DefaultSqlWriter) GetContentLength ¶
func (sw *DefaultSqlWriter) GetContentLength() int
func (*DefaultSqlWriter) WriteRow ¶ added in v0.8.0
func (sw *DefaultSqlWriter) WriteRow(row *table.Row) error
func (*DefaultSqlWriter) WriteStrings ¶ added in v0.8.0
func (sw *DefaultSqlWriter) WriteStrings(record []string) error
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 FileFlusher ¶
type FileFlusher struct {
// contains filtered or unexported fields
}
func NewFileContentFlusher ¶
func NewFileContentFlusher(writer table.Flusher) *FileFlusher
func (*FileFlusher) FlushBuffer ¶
func (f *FileFlusher) FlushBuffer(buf *bytes.Buffer) (int, error)
type SQLFlusher ¶
type SQLFlusher struct {
// contains filtered or unexported fields
}
func NewSQLFlusher ¶
func NewSQLFlusher(tbl *table.Table) *SQLFlusher
func (*SQLFlusher) FlushBuffer ¶
func (f *SQLFlusher) FlushBuffer(buf *bytes.Buffer) (int, error)
type TAEReader ¶
type TAEReader struct {
// contains filtered or unexported fields
}
TAEReader implements the io.Reader interface for reading a tae file. Deprecated
func NewTaeReader ¶
func NewTaeReader(ctx context.Context, tbl *table.Table, filePath string, filesize int64, fs fileservice.FileService, mp *mpool.MPool) (*TAEReader, error)
NewTaeReader returns a TAEReader. Deprecated
type TAEWriter ¶
type TAEWriter struct {
// contains filtered or unexported fields
}
TAEWriter implements table.RowWriter and writes data to a tae file. Deprecated
func NewTAEWriter ¶
func NewTAEWriter(ctx context.Context, tbl *table.Table, mp *mpool.MPool, filePath string, fs fileservice.FileService) *TAEWriter
NewTAEWriter returns a new instance of TAEWriter Deprecated
func (*TAEWriter) FlushAndClose ¶
FlushAndClose implement ETLWriter
func (*TAEWriter) GetContent ¶
func (*TAEWriter) GetContentLength ¶
func (*TAEWriter) WriteStrings ¶
WriteStrings implement ETLWriter