yxrecord

package
v0.0.0-...-4abef55 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataType

type DataType int
const (
	Blob DataType = iota
	Boolean
	Byte
	Date
	Float64
	Int64
	String
)

type YxdbField

type YxdbField struct {
	Name string
	Type DataType
}

YxdbField contains the name and type of field in a .yxdb file.

type YxdbRecord

type YxdbRecord struct {
	Fields    []YxdbField
	FixedSize int
	HasVar    bool
	// contains filtered or unexported fields
}

func FromFieldList

func FromFieldList(fields []m.MetaInfoField) (*YxdbRecord, error)

func (*YxdbRecord) ExtractBlobWithIndex

func (y *YxdbRecord) ExtractBlobWithIndex(index int, buffer []byte) []byte

func (*YxdbRecord) ExtractBlobWithName

func (y *YxdbRecord) ExtractBlobWithName(name string, buffer []byte) []byte

func (*YxdbRecord) ExtractBoolWithIndex

func (y *YxdbRecord) ExtractBoolWithIndex(index int, buffer []byte) (bool, bool)

func (*YxdbRecord) ExtractBoolWithName

func (y *YxdbRecord) ExtractBoolWithName(name string, buffer []byte) (bool, bool)

func (*YxdbRecord) ExtractByteWithIndex

func (y *YxdbRecord) ExtractByteWithIndex(index int, buffer []byte) (byte, bool)

func (*YxdbRecord) ExtractByteWithName

func (y *YxdbRecord) ExtractByteWithName(name string, buffer []byte) (byte, bool)

func (*YxdbRecord) ExtractFloat64WithIndex

func (y *YxdbRecord) ExtractFloat64WithIndex(index int, buffer []byte) (float64, bool)

func (*YxdbRecord) ExtractFloat64WithName

func (y *YxdbRecord) ExtractFloat64WithName(name string, buffer []byte) (float64, bool)

func (*YxdbRecord) ExtractInt64WithIndex

func (y *YxdbRecord) ExtractInt64WithIndex(index int, buffer []byte) (int64, bool)

func (*YxdbRecord) ExtractInt64WithName

func (y *YxdbRecord) ExtractInt64WithName(name string, buffer []byte) (int64, bool)

func (*YxdbRecord) ExtractStringWithIndex

func (y *YxdbRecord) ExtractStringWithIndex(index int, buffer []byte) (string, bool)

func (*YxdbRecord) ExtractStringWithName

func (y *YxdbRecord) ExtractStringWithName(name string, buffer []byte) (string, bool)

func (*YxdbRecord) ExtractTimeWithIndex

func (y *YxdbRecord) ExtractTimeWithIndex(index int, buffer []byte) (time.Time, bool)

func (*YxdbRecord) ExtractTimeWithName

func (y *YxdbRecord) ExtractTimeWithName(name string, buffer []byte) (time.Time, bool)

Jump to

Keyboard shortcuts

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