row

package
v0.0.0-...-8ffd201 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const RowsBufferSize = 10000

Variables

View Source
var Pool *sync.Pool

Functions

This section is empty.

Types

type GroupReader

type GroupReader func(indexes []int) (*RowsGroup, error)

type Reader

type Reader func() (*Row, error)

type Row

type Row struct {
	Keys []interface{}
	Vals []interface{}
}

func NewRow

func NewRow(vals ...interface{}) *Row

func (*Row) AppendKeys

func (r *Row) AppendKeys(keys ...interface{}) *Row

func (*Row) AppendRow

func (r *Row) AppendRow(row *Row) *Row

func (*Row) AppendVals

func (r *Row) AppendVals(vals ...interface{}) *Row

func (*Row) Clear

func (r *Row) Clear()

func (*Row) ClearKeys

func (r *Row) ClearKeys()

func (*Row) GetKeyString

func (r *Row) GetKeyString() string

type Rows

type Rows struct {
	Data  []*Row
	Order []datatype.OrderType
}

Rows for sort rows

func NewRows

func NewRows(order []datatype.OrderType) *Rows

func (*Rows) Append

func (r *Rows) Append(row *Row)

func (*Rows) Len

func (r *Rows) Len() int

func (*Rows) Less

func (r *Rows) Less(i, j int) bool

func (*Rows) Min

func (r *Rows) Min() int

func (*Rows) Sort

func (r *Rows) Sort()

func (*Rows) Swap

func (r *Rows) Swap(i, j int)

type RowsBuffer

type RowsBuffer struct {
	sync.Mutex
	MD         *metadata.Metadata
	BufferSize int
	RowsNumber int
	Index      int

	ValueBuffers  [][]interface{}
	ValueNilFlags [][]interface{} //bool

	KeyBuffers  [][]interface{}
	KeyNilFlags [][]interface{} //bool

	Reader io.Reader
	Writer io.Writer
}

func NewRowsBuffer

func NewRowsBuffer(md *metadata.Metadata, reader io.Reader, writer io.Writer) *RowsBuffer

func (*RowsBuffer) ClearValues

func (rb *RowsBuffer) ClearValues()

func (*RowsBuffer) Flush

func (rb *RowsBuffer) Flush() error

func (*RowsBuffer) Read

func (rb *RowsBuffer) Read() (*RowsGroup, error)

func (*RowsBuffer) ReadRow

func (rb *RowsBuffer) ReadRow() (*Row, error)

func (*RowsBuffer) Write

func (rb *RowsBuffer) Write(rg *RowsGroup) error

func (*RowsBuffer) WriteRow

func (rb *RowsBuffer) WriteRow(rows ...*Row) error

type RowsGroup

type RowsGroup struct {
	Metadata   *metadata.Metadata
	RowsNumber int
	Keys       [][]interface{}
	Vals       [][]interface{}
	Index      int
}

func NewRowsGroup

func NewRowsGroup(md *metadata.Metadata) *RowsGroup

func (*RowsGroup) AppendKeyColumns

func (rg *RowsGroup) AppendKeyColumns(keys ...[]interface{})

func (*RowsGroup) AppendRowGroupColumns

func (rg *RowsGroup) AppendRowGroupColumns(_rg *RowsGroup)

func (*RowsGroup) AppendRowGroupRows

func (rg *RowsGroup) AppendRowGroupRows(_rg *RowsGroup)

func (*RowsGroup) AppendRowKeys

func (rg *RowsGroup) AppendRowKeys(keys ...interface{})

func (*RowsGroup) AppendRowVals

func (rg *RowsGroup) AppendRowVals(vals ...interface{})

func (*RowsGroup) AppendValColumns

func (rg *RowsGroup) AppendValColumns(cols ...[]interface{})

func (*RowsGroup) ClearColumns

func (rg *RowsGroup) ClearColumns()

func (*RowsGroup) ClearRows

func (rg *RowsGroup) ClearRows()

func (*RowsGroup) GetColumnIndex

func (rg *RowsGroup) GetColumnIndex(name string) int

func (*RowsGroup) GetColumnsNumber

func (rg *RowsGroup) GetColumnsNumber() int

func (*RowsGroup) GetKeyColumnsNumber

func (rg *RowsGroup) GetKeyColumnsNumber() int

func (*RowsGroup) GetKeyString

func (rg *RowsGroup) GetKeyString(index int) string

func (*RowsGroup) GetRow

func (rg *RowsGroup) GetRow(ri int) *Row

func (*RowsGroup) GetRowKeys

func (rg *RowsGroup) GetRowKeys(ri int) []interface{}

func (*RowsGroup) GetRowVals

func (rg *RowsGroup) GetRowVals(ri int) []interface{}

func (*RowsGroup) GetRowsNumber

func (rg *RowsGroup) GetRowsNumber() int

func (*RowsGroup) Read

func (rg *RowsGroup) Read() (*Row, error)

func (*RowsGroup) ResetIndex

func (rg *RowsGroup) ResetIndex()

func (*RowsGroup) SetColumn

func (rg *RowsGroup) SetColumn(index int, col []interface{})

func (*RowsGroup) Write

func (rg *RowsGroup) Write(r *Row)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL