ssd

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SENTINEL smallest one and only in the alphabet
	SENTINEL byte = iota

	// SOH start of heading 1, field separator
	SOH

	// FRAG fragment long text, 2
	FRAG

	// SOA start of array, 3
	SOA

	// EOA end of array, 4
	EOA

	// AED array element divider, 5
	AED

	// EOO end of object, 6
	EOO

	// TEXT direct string start, 14
	TEXT = iota + 7

	// FLT32 float numeric start, 15
	FLT32

	// FLT64 double numeric start, 16
	FLT64

	// INT8 signed byte integer start, 17
	INT8

	// INT16 signed short integer start, 18
	INT16

	// INT32 unsigned int integer start, 19
	INT32

	// INT64 unsigned long integer start, 20
	INT64

	// BOOL boolean true start, 21
	BOOL

	// NULL NULL start, 22
	NULL

	// JSON JSON start, 23
	JSON
)
View Source
const (
	MaxDoc = 1 << 16
)

Variables

View Source
var (
	VALUES = []byte{TEXT, FLT32, FLT64, INT8, INT16, INT32, INT64, BOOL, NULL, JSON}
)

Functions

func IsControlCharacter

func IsControlCharacter(c byte) bool

Types

type Column

type Column struct {
	Name   string
	RowIdx []byte
	Value  []uint64
}

type Columnar

type Columnar struct {
	Float64 []float64
	Int64   []int64
	Bool    []bool
	Text    []uint32
}

type EntityMeta

type EntityMeta struct {
	// contains filtered or unexported fields
}

func EntityMetaFromBytes

func EntityMetaFromBytes(d []byte) (*EntityMeta, error)

func NewEntityMeta

func NewEntityMeta() *EntityMeta

func (*EntityMeta) Bytes

func (s *EntityMeta) Bytes() ([]byte, error)

func (*EntityMeta) GenerateCode

func (s *EntityMeta) GenerateCode(path [][]byte) []byte

func (*EntityMeta) GetCode

func (s *EntityMeta) GetCode(path [][]byte) ([]byte, bool)

GetCode given entity path, returns UTF-8 code represents the path, true if found, otherwise false

func (*EntityMeta) GetPath

func (s *EntityMeta) GetPath(code []byte) [][]byte

GetPath given UTF-8 code, returns entity path

type HeaderISA

type HeaderISA struct {
	Entity    []uint16
	Attribute []uint16
}

type HeaderLookupTable

type HeaderLookupTable struct {
	Text    HeaderISA
	Float64 HeaderISA
	Int64   HeaderISA
	Bool    HeaderISA
	Null    HeaderISA
}

type IndexedBlock

type IndexedBlock struct {
	ID       uint64
	EntityID []uint32
	Meta     *EntityMeta
	Entity   hfmi.FMI
	Columnar Columnar
	Content  hfmi.FMI
	HLT      HeaderLookupTable
	HeaderDA []uint32
	FragDA   []uint32
}

type Node

type Node struct {
	Name     []byte
	Code     []byte
	Children []*Node
}

type ParsedBlock

type ParsedBlock struct {
	Count    uint32
	Meta     *EntityMeta
	Entity   *bytes.Buffer
	Columnar Columnar
	Content  *TextColumnar
}

type ResultSet

type ResultSet struct {
	RowId      []uint64
	ColumnType []byte
	Column     []Column
	Text       [][]byte
	Json       [][]byte
	Aggregate  []aggregator.Aggregator
	Order      []int
}

type TextColumnar

type TextColumnar struct {
	// contains filtered or unexported fields
}

func NewTextColumnar

func NewTextColumnar() *TextColumnar

func (*TextColumnar) Add

func (tc *TextColumnar) Add(t string) uint32

Add add text t to text columnar, returns offset in the column

func (*TextColumnar) Value

func (tc *TextColumnar) Value() []byte

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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