schema

package
v0.0.0-...-d271c08 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2014 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CAT_OTHER = iota
	CAT_NUMBER
	CAT_VARBINARY
)

Column categories

View Source
const (
	CACHE_NONE = 0
	CACHE_RW   = 1
	CACHE_W    = 2
)

Cache types

Variables

This section is empty.

Functions

This section is empty.

Types

type Index

type Index struct {
	Name        string
	Columns     []string
	Cardinality []uint64
	DataColumns []string
}

func NewIndex

func NewIndex(name string) *Index

func (*Index) AddColumn

func (idx *Index) AddColumn(name string, cardinality uint64)

func (*Index) FindColumn

func (idx *Index) FindColumn(name string) int

func (*Index) FindDataColumn

func (idx *Index) FindDataColumn(name string) int

type Table

type Table struct {
	Name      string
	Columns   []TableColumn
	Indexes   []*Index
	PKColumns []int
	CacheType int
}

func NewTable

func NewTable(name string) *Table

func (*Table) AddColumn

func (ta *Table) AddColumn(name string, columnType string, defval sqltypes.Value, extra string)

func (*Table) AddIndex

func (ta *Table) AddIndex(name string) (index *Index)

func (*Table) FindColumn

func (ta *Table) FindColumn(name string) int

func (*Table) GetPKColumn

func (ta *Table) GetPKColumn(index int) *TableColumn

type TableColumn

type TableColumn struct {
	Name     string
	Category int
	IsAuto   bool
	Default  sqltypes.Value
}

Jump to

Keyboard shortcuts

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