Documentation
¶
Index ¶
- type Column
- type ColumnAccessor
- type ColumnarRecordset
- func (c *ColumnarRecordset) ColumnsCount() int
- func (c *ColumnarRecordset) GetColumnByIndex(i int) Column[any]
- func (c *ColumnarRecordset) GetColumnByName(name string) Column[any]
- func (c *ColumnarRecordset) GetColumnIndex(name string) int
- func (rs *ColumnarRecordset) GetRow(i int) Row
- func (rs *ColumnarRecordset) Name() string
- func (rs *ColumnarRecordset) NewRow() Row
- func (rs *ColumnarRecordset) RowsCount() int
- type Recordset
- type Row
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Column ¶
type Column[T any] interface { Name() string DefaultValue() T GetValue(row int) (value T, err error) SetValue(row int, value T) (err error) ValueType() reflect.Type IsBitmap() bool Add(value T) error }
func NewBitmapColumn ¶ added in v0.32.0
func NewBitmapColumn[T comparable](name string, initialCapacity int) Column[T]
func NewBoolColumn ¶ added in v0.32.0
type ColumnAccessor ¶
type ColumnarRecordset ¶
type ColumnarRecordset struct {
// contains filtered or unexported fields
}
func NewColumnarRecordset ¶
func NewColumnarRecordset(cols ...Column[any]) *ColumnarRecordset
func (*ColumnarRecordset) ColumnsCount ¶
func (c *ColumnarRecordset) ColumnsCount() int
func (*ColumnarRecordset) GetColumnByIndex ¶
func (*ColumnarRecordset) GetColumnByName ¶
func (*ColumnarRecordset) GetColumnIndex ¶
func (*ColumnarRecordset) GetRow ¶
func (rs *ColumnarRecordset) GetRow(i int) Row
func (*ColumnarRecordset) Name ¶
func (rs *ColumnarRecordset) Name() string
func (*ColumnarRecordset) NewRow ¶
func (rs *ColumnarRecordset) NewRow() Row
func (*ColumnarRecordset) RowsCount ¶
func (rs *ColumnarRecordset) RowsCount() int
type Recordset ¶
type Recordset interface {
ColumnAccessor
Name() string // Can be useful for debugging purpose (or for joining?)
NewRow() Row
// GetRow returns nil if out of range
GetRow(i int) Row
RowsCount() int
}
Recordset provides interface for working with a set of row/column based data
type Row ¶
type Row interface {
GetValueByName(name string, rs Recordset) (any, error)
SetValueByName(name string, value any, rs Recordset) error
GetValueByIndex(i int, rs Recordset) (any, error)
SetValueByIndex(i int, value any, rs Recordset) error
Data(rs Recordset) (data []any, err error)
}
Row defines an interface for storing recordset row data. We intentionally pass cols information to functions of the interface so we do not need to allocate memory for cols pointer in each row.
Click to show internal directories.
Click to hide internal directories.