Documentation ¶
Index ¶
- Constants
- Variables
- func AppendIndexKey(b []byte, tbl *Table, idx *Index, record Record) (key []byte, err error)
- type FLdSeq
- type Field
- type IdxName
- type IdxSeq
- type IdxType
- func (z *IdxType) DecodeMsg(dc *msgp.Reader) (err error)
- func (z IdxType) EncodeMsg(en *msgp.Writer) (err error)
- func (z IdxType) MarshalMsg(b []byte) (o []byte, err error)
- func (z IdxType) Msgsize() (s int)
- func (i IdxType) String() string
- func (z *IdxType) UnmarshalMsg(bts []byte) (o []byte, err error)
- type Index
- type Record
- type Schema
- func (s *Schema) AddTable(tblName string) error
- func (z *Schema) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *Schema) EncodeMsg(en *msgp.Writer) (err error)
- func (s *Schema) GetTable(tblName string) *Table
- func (s *Schema) Load(bt []byte) error
- func (z *Schema) MarshalMsg(b []byte) (o []byte, err error)
- func (z *Schema) Msgsize() (s int)
- func (s *Schema) Save() (bt []byte, err error)
- func (z *Schema) UnmarshalMsg(bts []byte) (o []byte, err error)
- type Table
- func (t *Table) AddIndex(idxName string, idxType IdxType) error
- func (z *Table) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *Table) EncodeMsg(en *msgp.Writer) (err error)
- func (t *Table) GetIndex(idxName string) *Index
- func (z *Table) MarshalMsg(b []byte) (o []byte, err error)
- func (z *Table) Msgsize() (s int)
- func (z *Table) UnmarshalMsg(bts []byte) (o []byte, err error)
- type TblName
- type TblSeq
Constants ¶
View Source
const ( TBL_NAME_INFORMATION_SCHEMA = "information_schema" FLD_IDX_PK = 0 FID_NAME_PK = "0" )
Variables ¶
View Source
var ErrInvalidIndexType = errors.New("invalid index type")
Functions ¶
Types ¶
type FLdSeq ¶
type FLdSeq uint16
func (FLdSeq) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type Field ¶
func (*Field) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type IdxName ¶
type IdxName string
const (
NameIdxPk IdxName = "0"
)
func (IdxName) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type IdxSeq ¶
type IdxSeq uint16
func (IdxSeq) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type IdxType ¶
type IdxType uint8
func (IdxType) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type Index ¶
func (*Index) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type Record ¶
type Record interface { Get(fieldName string) *Field // EncodeAll appends the binary representation of the record to the byte slice, // and returns the updated slice. EncodeAll(b []byte) ([]byte, error) // DecodeAll decodes the binary representation of the record from the byte slice. DecodeAll(b []byte) error // EncodeField appends the binary representation of the field to the byte slice, // and returns the updated slice. EncodeField(b []byte, id FLdSeq) ([]byte, error) // DecodeField decodes the binary representation of the field from the byte slice. DecodeField(b []byte, id FLdSeq) error }
type Schema ¶
type Schema struct { Tables []*Table // contains filtered or unexported fields }
TODO: 임시 - 동시 접근을 막기 위한 mutex lock 필요
func (*Schema) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type Table ¶
type Table struct { Seq TblSeq Name string Indexes []*Index // contains filtered or unexported fields }
func (*Table) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type TblName ¶
type TblName string
const (
NameTblInformationSchema TblName = "information_schema"
)
func (TblName) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type TblSeq ¶
type TblSeq uint16
func (TblSeq) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
Click to show internal directories.
Click to hide internal directories.