state

package
v0.0.0-...-d3c4416 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const RowCount int = 1000000

Variables

View Source
var HashMap = make(map[string][][][]byte)

Hacky mock for a table in memory

View Source
var QueryMap = make(map[string]TableDataHandle)
View Source
var SchemaMap = make(map[string]map[string]*ColumnInfo)

Functions

func Init

func Init()

Types

type ColumnInfo

type ColumnInfo struct {
	Index int
	Typ   ColumnType
}

type ColumnType

type ColumnType int
const (
	ColumnType_Int ColumnType = iota
	ColumnType_String
)

type DataHandleStatus

type DataHandleStatus int
const (
	DataHandleStatus_NotReady DataHandleStatus = iota
	DataHandleStatus_Loading
	DataHandleStatus_Ready
	DataHandleStatus_Error
)

type SimpleTableDataHandle

type SimpleTableDataHandle struct {
	Status  DataHandleStatus
	DataSet [][][]byte
}

func NewSimpleTableDataHandle

func NewSimpleTableDataHandle() *SimpleTableDataHandle

func (*SimpleTableDataHandle) Cols

func (tds *SimpleTableDataHandle) Cols() int

func (*SimpleTableDataHandle) GetData

func (tds *SimpleTableDataHandle) GetData(rowId int, colId int) []byte

func (*SimpleTableDataHandle) GetStatus

func (tds *SimpleTableDataHandle) GetStatus() DataHandleStatus

func (*SimpleTableDataHandle) Load

func (tds *SimpleTableDataHandle) Load(tableName string, columns []int) error

func (*SimpleTableDataHandle) Rows

func (tds *SimpleTableDataHandle) Rows() int

func (*SimpleTableDataHandle) SetStatus

func (tds *SimpleTableDataHandle) SetStatus(status DataHandleStatus)

type TableDataHandle

type TableDataHandle interface {
	Load(tableName string, columns []int) error
	Cols() int
	Rows() int
	GetData(rowInd int, colInd int) []byte
	SetStatus(status DataHandleStatus)
	GetStatus() DataHandleStatus
}

Jump to

Keyboard shortcuts

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