Documentation ¶
Index ¶
- Constants
- Variables
- type BlockStreamFmtReader
- type BlockStreamFmtWriter
- type CSVBlockStreamFmtReader
- func (c *CSVBlockStreamFmtReader) BlockStreamFmtRead(ctx context.Context, sample *data.Block, blockSize int) (blockStream <-chan *data.Block, yield func() (int, error))
- func (c *CSVBlockStreamFmtReader) ReadColumnTextsCont(fb *bytepool.FrameBuffer, numRows int, cols []*column.CHColumn) (int, error)
- func (c *CSVBlockStreamFmtReader) ReadElem(fb *bytepool.FrameBuffer, cols []*column.CHColumn, idx int) error
- func (c *CSVBlockStreamFmtReader) ReadFirstColumnTexts(fb *bytepool.FrameBuffer, numRows int, cols []*column.CHColumn) (int, error)
- func (c *CSVBlockStreamFmtReader) ReadFirstRow(fb *bytepool.FrameBuffer, cols []*column.CHColumn) error
- func (c *CSVBlockStreamFmtReader) ReadRowCont(fb *bytepool.FrameBuffer, cols []*column.CHColumn) error
- type CSVBlockStreamFmtWriter
- func (c *CSVBlockStreamFmtWriter) BlockStreamFmtWrite(blockStream <-chan *data.Block)
- func (c *CSVBlockStreamFmtWriter) Flush() error
- func (c *CSVBlockStreamFmtWriter) WriteFirstFrame(frame [][]string, cols []*column.CHColumn) (int, error)
- func (c *CSVBlockStreamFmtWriter) WriteFirstRow(record []string, cols []*column.CHColumn) error
- func (c *CSVBlockStreamFmtWriter) WriteFrameCont(frame [][]string, cols []*column.CHColumn) (int, error)
- func (c *CSVBlockStreamFmtWriter) WriteRowCont(record []string, cols []*column.CHColumn) error
- func (c *CSVBlockStreamFmtWriter) Yield() (int, error)
- type JSONBlockStreamFmtReader
- func (j *JSONBlockStreamFmtReader) BlockStreamFmtRead(ctx context.Context, sample *data.Block, blockSize int) (blockStream <-chan *data.Block, yield func() (int, error))
- func (j *JSONBlockStreamFmtReader) ReadColumnTextsCont(fb *bytepool.FrameBuffer, numRows int, cols []*column.CHColumn) (int, error)
- func (j *JSONBlockStreamFmtReader) ReadFirstColumnTexts(fb *bytepool.FrameBuffer, numRows int, cols []*column.CHColumn) (int, error)
- func (j *JSONBlockStreamFmtReader) ReadFirstRow(fb *bytepool.FrameBuffer, cols []*column.CHColumn) (err error)
- func (j *JSONBlockStreamFmtReader) ReadRowCont(fb *bytepool.FrameBuffer, cols []*column.CHColumn) error
- type JSONBlockStreamFmtWriter
- func (j *JSONBlockStreamFmtWriter) BlockStreamFmtWrite(blockStream <-chan *data.Block)
- func (j *JSONBlockStreamFmtWriter) Flush() error
- func (j *JSONBlockStreamFmtWriter) WriteEnd() error
- func (j *JSONBlockStreamFmtWriter) WriteFirstFrame(frame [][]string, cols []*column.CHColumn) (int, error)
- func (j *JSONBlockStreamFmtWriter) WriteFirstRow(record []string, cols []*column.CHColumn) error
- func (j *JSONBlockStreamFmtWriter) WriteFrameCont(frame [][]string, cols []*column.CHColumn) (int, error)
- func (j *JSONBlockStreamFmtWriter) WriteRowCont(record []string, cols []*column.CHColumn) error
- func (j *JSONBlockStreamFmtWriter) Yield() (int, error)
- type PrettyBlockStreamFmtWriter
- func (p *PrettyBlockStreamFmtWriter) BlockStreamFmtWrite(blockStream <-chan *data.Block)
- func (p *PrettyBlockStreamFmtWriter) Flush() error
- func (p *PrettyBlockStreamFmtWriter) WriteFirstFrame(frame [][]string, cols []*column.CHColumn) (int, error)
- func (p *PrettyBlockStreamFmtWriter) WriteFirstRow(record []string, cols []*column.CHColumn) error
- func (p *PrettyBlockStreamFmtWriter) WriteFrameCont(frame [][]string, cols []*column.CHColumn) (int, error)
- func (p *PrettyBlockStreamFmtWriter) WriteRowCont(record []string, cols []*column.CHColumn) (err error)
- func (p *PrettyBlockStreamFmtWriter) Yield() (int, error)
- type ValuesBlockStreamFmtReader
- func (v *ValuesBlockStreamFmtReader) BlockStreamFmtRead(ctx context.Context, sample *data.Block, blockSize int) (blockStream <-chan *data.Block, yield func() (int, error))
- func (v *ValuesBlockStreamFmtReader) ReadColumnTextsCont(fb *bytepool.FrameBuffer, numRows int, cols []*column.CHColumn) (int, error)
- func (v *ValuesBlockStreamFmtReader) ReadElem(fb *bytepool.FrameBuffer, cols []*column.CHColumn, idx int) error
- func (v *ValuesBlockStreamFmtReader) ReadFirstColumnTexts(fb *bytepool.FrameBuffer, numRows int, cols []*column.CHColumn) (int, error)
- func (v *ValuesBlockStreamFmtReader) ReadFirstRow(fb *bytepool.FrameBuffer, cols []*column.CHColumn) error
- func (v *ValuesBlockStreamFmtReader) ReadRowCont(fb *bytepool.FrameBuffer, cols []*column.CHColumn) error
- type ValuesBlockStreamFmtWriter
- func (v *ValuesBlockStreamFmtWriter) BlockStreamFmtWrite(blockStream <-chan *data.Block)
- func (v *ValuesBlockStreamFmtWriter) Flush() error
- func (v *ValuesBlockStreamFmtWriter) WriteFirstFrame(frame [][]string, cols []*column.CHColumn) (int, error)
- func (v *ValuesBlockStreamFmtWriter) WriteFirstRow(record []string, cols []*column.CHColumn) error
- func (v *ValuesBlockStreamFmtWriter) WriteFrameCont(frame [][]string, cols []*column.CHColumn) (int, error)
- func (v *ValuesBlockStreamFmtWriter) WriteRowCont(record []string, cols []*column.CHColumn) error
- func (v *ValuesBlockStreamFmtWriter) Yield() (int, error)
Constants ¶
View Source
const ( PRETTY = iota CSVWITHNAMES CSV VALUES JSON TOML )
Variables ¶
View Source
var Formats = map[int]string{ CSVWITHNAMES: "CSVWITHNAMES", CSV: "CSV", VALUES: "VALUES", JSON: "JSON", TOML: "TOML", PRETTY: "PRETTY", }
Functions ¶
This section is empty.
Types ¶
type BlockStreamFmtReader ¶
type BlockStreamFmtReader interface { // BlockStreamFmtRead starts reading blocks, return stream of blocks to be consumed. // if ctx is cancelled, read will stop asap and channel will be closed // Yield blocks until the last BlockStreamFmtRead is completed // return total rows notFirstRow and error if any BlockStreamFmtRead( ctx context.Context, sample *data.Block, blockSize int, ) (blockStream <-chan *data.Block, yield func() (int, error)) }
type BlockStreamFmtWriter ¶
type BlockStreamFmtWriter interface { // BlockStreamFmtWrite starts writing stream of blocks into respective format, non blocking BlockStreamFmtWrite(blockStream <-chan *data.Block) // Yield blocks until all blocks are consumed from BlockStreamFmtWrite // returns total rows written and error if any Yield() (int, error) }
BlockStreamFmtWriter writes data of block to it's respective format of it's concrete type
type CSVBlockStreamFmtReader ¶
type CSVBlockStreamFmtReader struct {
// contains filtered or unexported fields
}
func (*CSVBlockStreamFmtReader) BlockStreamFmtRead ¶
func (*CSVBlockStreamFmtReader) ReadColumnTextsCont ¶
func (c *CSVBlockStreamFmtReader) ReadColumnTextsCont(fb *bytepool.FrameBuffer, numRows int, cols []*column.CHColumn) (int, error)
func (*CSVBlockStreamFmtReader) ReadElem ¶
func (c *CSVBlockStreamFmtReader) ReadElem(fb *bytepool.FrameBuffer, cols []*column.CHColumn, idx int) error
func (*CSVBlockStreamFmtReader) ReadFirstColumnTexts ¶
func (c *CSVBlockStreamFmtReader) ReadFirstColumnTexts(fb *bytepool.FrameBuffer, numRows int, cols []*column.CHColumn) (int, error)
func (*CSVBlockStreamFmtReader) ReadFirstRow ¶
func (c *CSVBlockStreamFmtReader) ReadFirstRow(fb *bytepool.FrameBuffer, cols []*column.CHColumn) error
func (*CSVBlockStreamFmtReader) ReadRowCont ¶
func (c *CSVBlockStreamFmtReader) ReadRowCont(fb *bytepool.FrameBuffer, cols []*column.CHColumn) error
type CSVBlockStreamFmtWriter ¶
type CSVBlockStreamFmtWriter struct {
// contains filtered or unexported fields
}
func (*CSVBlockStreamFmtWriter) BlockStreamFmtWrite ¶
func (c *CSVBlockStreamFmtWriter) BlockStreamFmtWrite(blockStream <-chan *data.Block)
func (*CSVBlockStreamFmtWriter) Flush ¶
func (c *CSVBlockStreamFmtWriter) Flush() error
func (*CSVBlockStreamFmtWriter) WriteFirstFrame ¶
func (*CSVBlockStreamFmtWriter) WriteFirstRow ¶
func (c *CSVBlockStreamFmtWriter) WriteFirstRow(record []string, cols []*column.CHColumn) error
func (*CSVBlockStreamFmtWriter) WriteFrameCont ¶
func (*CSVBlockStreamFmtWriter) WriteRowCont ¶
func (c *CSVBlockStreamFmtWriter) WriteRowCont(record []string, cols []*column.CHColumn) error
func (*CSVBlockStreamFmtWriter) Yield ¶
func (c *CSVBlockStreamFmtWriter) Yield() (int, error)
type JSONBlockStreamFmtReader ¶
type JSONBlockStreamFmtReader struct {
// contains filtered or unexported fields
}
func NewJSONBlockStreamFmtReader ¶
func NewJSONBlockStreamFmtReader(r io.Reader) *JSONBlockStreamFmtReader
func (*JSONBlockStreamFmtReader) BlockStreamFmtRead ¶
func (*JSONBlockStreamFmtReader) ReadColumnTextsCont ¶
func (j *JSONBlockStreamFmtReader) ReadColumnTextsCont(fb *bytepool.FrameBuffer, numRows int, cols []*column.CHColumn) (int, error)
func (*JSONBlockStreamFmtReader) ReadFirstColumnTexts ¶
func (j *JSONBlockStreamFmtReader) ReadFirstColumnTexts(fb *bytepool.FrameBuffer, numRows int, cols []*column.CHColumn) (int, error)
func (*JSONBlockStreamFmtReader) ReadFirstRow ¶
func (j *JSONBlockStreamFmtReader) ReadFirstRow(fb *bytepool.FrameBuffer, cols []*column.CHColumn) (err error)
func (*JSONBlockStreamFmtReader) ReadRowCont ¶
func (j *JSONBlockStreamFmtReader) ReadRowCont(fb *bytepool.FrameBuffer, cols []*column.CHColumn) error
type JSONBlockStreamFmtWriter ¶
type JSONBlockStreamFmtWriter struct {
// contains filtered or unexported fields
}
func NewJSONBlockStreamFmtWriter ¶
func NewJSONBlockStreamFmtWriter(w io.Writer) *JSONBlockStreamFmtWriter
func (*JSONBlockStreamFmtWriter) BlockStreamFmtWrite ¶
func (j *JSONBlockStreamFmtWriter) BlockStreamFmtWrite(blockStream <-chan *data.Block)
func (*JSONBlockStreamFmtWriter) Flush ¶
func (j *JSONBlockStreamFmtWriter) Flush() error
func (*JSONBlockStreamFmtWriter) WriteEnd ¶
func (j *JSONBlockStreamFmtWriter) WriteEnd() error
func (*JSONBlockStreamFmtWriter) WriteFirstFrame ¶
func (*JSONBlockStreamFmtWriter) WriteFirstRow ¶
func (j *JSONBlockStreamFmtWriter) WriteFirstRow(record []string, cols []*column.CHColumn) error
func (*JSONBlockStreamFmtWriter) WriteFrameCont ¶
func (*JSONBlockStreamFmtWriter) WriteRowCont ¶
func (j *JSONBlockStreamFmtWriter) WriteRowCont(record []string, cols []*column.CHColumn) error
func (*JSONBlockStreamFmtWriter) Yield ¶
func (j *JSONBlockStreamFmtWriter) Yield() (int, error)
type PrettyBlockStreamFmtWriter ¶
type PrettyBlockStreamFmtWriter struct {
// contains filtered or unexported fields
}
func NewPrettyBlockStreamFmtWriter ¶
func NewPrettyBlockStreamFmtWriter(w io.Writer) *PrettyBlockStreamFmtWriter
func (*PrettyBlockStreamFmtWriter) BlockStreamFmtWrite ¶
func (p *PrettyBlockStreamFmtWriter) BlockStreamFmtWrite(blockStream <-chan *data.Block)
func (*PrettyBlockStreamFmtWriter) Flush ¶
func (p *PrettyBlockStreamFmtWriter) Flush() error
func (*PrettyBlockStreamFmtWriter) WriteFirstFrame ¶
func (*PrettyBlockStreamFmtWriter) WriteFirstRow ¶
func (p *PrettyBlockStreamFmtWriter) WriteFirstRow(record []string, cols []*column.CHColumn) error
func (*PrettyBlockStreamFmtWriter) WriteFrameCont ¶
func (*PrettyBlockStreamFmtWriter) WriteRowCont ¶
func (p *PrettyBlockStreamFmtWriter) WriteRowCont(record []string, cols []*column.CHColumn) (err error)
func (*PrettyBlockStreamFmtWriter) Yield ¶
func (p *PrettyBlockStreamFmtWriter) Yield() (int, error)
type ValuesBlockStreamFmtReader ¶
type ValuesBlockStreamFmtReader struct {
// contains filtered or unexported fields
}
func NewValuesBlockStreamReader ¶
func NewValuesBlockStreamReader(r io.Reader) *ValuesBlockStreamFmtReader
func (*ValuesBlockStreamFmtReader) BlockStreamFmtRead ¶
func (*ValuesBlockStreamFmtReader) ReadColumnTextsCont ¶
func (v *ValuesBlockStreamFmtReader) ReadColumnTextsCont(fb *bytepool.FrameBuffer, numRows int, cols []*column.CHColumn) (int, error)
func (*ValuesBlockStreamFmtReader) ReadElem ¶
func (v *ValuesBlockStreamFmtReader) ReadElem(fb *bytepool.FrameBuffer, cols []*column.CHColumn, idx int) error
func (*ValuesBlockStreamFmtReader) ReadFirstColumnTexts ¶
func (v *ValuesBlockStreamFmtReader) ReadFirstColumnTexts(fb *bytepool.FrameBuffer, numRows int, cols []*column.CHColumn) (int, error)
func (*ValuesBlockStreamFmtReader) ReadFirstRow ¶
func (v *ValuesBlockStreamFmtReader) ReadFirstRow(fb *bytepool.FrameBuffer, cols []*column.CHColumn) error
func (*ValuesBlockStreamFmtReader) ReadRowCont ¶
func (v *ValuesBlockStreamFmtReader) ReadRowCont(fb *bytepool.FrameBuffer, cols []*column.CHColumn) error
type ValuesBlockStreamFmtWriter ¶
type ValuesBlockStreamFmtWriter struct {
// contains filtered or unexported fields
}
func NewValuesBlockStreamFmtWriter ¶
func NewValuesBlockStreamFmtWriter(w io.Writer) *ValuesBlockStreamFmtWriter
func (*ValuesBlockStreamFmtWriter) BlockStreamFmtWrite ¶
func (v *ValuesBlockStreamFmtWriter) BlockStreamFmtWrite(blockStream <-chan *data.Block)
func (*ValuesBlockStreamFmtWriter) Flush ¶
func (v *ValuesBlockStreamFmtWriter) Flush() error
func (*ValuesBlockStreamFmtWriter) WriteFirstFrame ¶
func (*ValuesBlockStreamFmtWriter) WriteFirstRow ¶
func (v *ValuesBlockStreamFmtWriter) WriteFirstRow(record []string, cols []*column.CHColumn) error
func (*ValuesBlockStreamFmtWriter) WriteFrameCont ¶
func (*ValuesBlockStreamFmtWriter) WriteRowCont ¶
func (v *ValuesBlockStreamFmtWriter) WriteRowCont(record []string, cols []*column.CHColumn) error
func (*ValuesBlockStreamFmtWriter) Yield ¶
func (v *ValuesBlockStreamFmtWriter) Yield() (int, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.