type_

package
v0.0.0-...-d2e8aec Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BOOLEAN = iota
	INTEGER
	DECIMAL
	REALNUMBER
	VARCHAR
)
View Source
const INTEGER_SIZE = 8

Variables

This section is empty.

Functions

This section is empty.

Types

type Boolean

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

func (*Boolean) Deserialize

func (b *Boolean) Deserialize(data []byte) error

func (*Boolean) GetSize

func (b *Boolean) GetSize() uint64

func (*Boolean) GetTypeID

func (b *Boolean) GetTypeID() int8

func (*Boolean) GetTypeName

func (b *Boolean) GetTypeName() string

func (*Boolean) GetValue

func (b *Boolean) GetValue() interface{}

func (*Boolean) Serialize

func (b *Boolean) Serialize() []byte

func (*Boolean) SetValue

func (b *Boolean) SetValue(v interface{})

type Integer

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

func (*Integer) Deserialize

func (i *Integer) Deserialize(data []byte) error

func (*Integer) GetSize

func (i *Integer) GetSize() uint64

func (*Integer) GetTypeID

func (i *Integer) GetTypeID() int8

func (*Integer) GetTypeName

func (i *Integer) GetTypeName() string

func (*Integer) GetValue

func (i *Integer) GetValue() interface{}

func (*Integer) SetValue

func (i *Integer) SetValue(v interface{})

type Type

type Type interface {
	GetTypeID() int8
	GetTypeName() string
	GetSize() uint64 // size in number of bytes
	GetValue() interface{}
	SetValue(interface{})
	Serialize() []byte
	Deserialize(b []byte) error
}

func TypeFactory

func TypeFactory(type_name string) Type

func TypeFromTupleFactory

func TypeFromTupleFactory(type_name string, data_ []byte, curr_pos uint64) (uint64, Type)

type Varchar

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

func (*Varchar) Deserialize

func (vc *Varchar) Deserialize(data []byte) error

this seems tricky for now assuming that we will get the entire memory location with length and string might have to re-think the implementation later if the api becomes tedious to call

func (*Varchar) GetSize

func (vc *Varchar) GetSize() uint64

func (*Varchar) GetTypeID

func (vc *Varchar) GetTypeID() int8

func (*Varchar) GetTypeName

func (vc *Varchar) GetTypeName() string

func (*Varchar) GetValue

func (vc *Varchar) GetValue() interface{}

func (*Varchar) Serialize

func (vc *Varchar) Serialize() []byte

func (*Varchar) SetValue

func (vc *Varchar) SetValue(v interface{})

Jump to

Keyboard shortcuts

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