vschema

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoIncrement

type AutoIncrement struct {
	Column string `protobuf:"bytes,1,opt,name=column,proto3" json:"column,omitempty"`
	// The sequence must match a table of type SEQUENCE.
	Sequence             string   `protobuf:"bytes,2,opt,name=sequence,proto3" json:"sequence,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Autoincrement is used to designate a column as auto-inc.

func (*AutoIncrement) Descriptor

func (*AutoIncrement) Descriptor() ([]byte, []int)

func (*AutoIncrement) GetColumn

func (m *AutoIncrement) GetColumn() string

func (*AutoIncrement) GetSequence

func (m *AutoIncrement) GetSequence() string

func (*AutoIncrement) ProtoMessage

func (*AutoIncrement) ProtoMessage()

func (*AutoIncrement) Reset

func (m *AutoIncrement) Reset()

func (*AutoIncrement) String

func (m *AutoIncrement) String() string

func (*AutoIncrement) XXX_DiscardUnknown

func (m *AutoIncrement) XXX_DiscardUnknown()

func (*AutoIncrement) XXX_Marshal

func (m *AutoIncrement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AutoIncrement) XXX_Merge

func (dst *AutoIncrement) XXX_Merge(src proto.Message)

func (*AutoIncrement) XXX_Size

func (m *AutoIncrement) XXX_Size() int

func (*AutoIncrement) XXX_Unmarshal

func (m *AutoIncrement) XXX_Unmarshal(b []byte) error

type Column

type Column struct {
	Name                 string     `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Type                 query.Type `protobuf:"varint,2,opt,name=type,proto3,enum=query.Type" json:"type,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

Column describes a column.

func (*Column) Descriptor

func (*Column) Descriptor() ([]byte, []int)

func (*Column) GetName

func (m *Column) GetName() string

func (*Column) GetType

func (m *Column) GetType() query.Type

func (*Column) ProtoMessage

func (*Column) ProtoMessage()

func (*Column) Reset

func (m *Column) Reset()

func (*Column) String

func (m *Column) String() string

func (*Column) XXX_DiscardUnknown

func (m *Column) XXX_DiscardUnknown()

func (*Column) XXX_Marshal

func (m *Column) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Column) XXX_Merge

func (dst *Column) XXX_Merge(src proto.Message)

func (*Column) XXX_Size

func (m *Column) XXX_Size() int

func (*Column) XXX_Unmarshal

func (m *Column) XXX_Unmarshal(b []byte) error

type ColumnVindex

type ColumnVindex struct {
	// Legacy implemenation, moving forward all vindexes should define a list of columns.
	Column string `protobuf:"bytes,1,opt,name=column,proto3" json:"column,omitempty"`
	// The name must match a vindex defined in Keyspace.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// List of columns that define this Vindex
	Columns              []string `protobuf:"bytes,3,rep,name=columns,proto3" json:"columns,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

ColumnVindex is used to associate a column to a vindex.

func (*ColumnVindex) Descriptor

func (*ColumnVindex) Descriptor() ([]byte, []int)

func (*ColumnVindex) GetColumn

func (m *ColumnVindex) GetColumn() string

func (*ColumnVindex) GetColumns

func (m *ColumnVindex) GetColumns() []string

func (*ColumnVindex) GetName

func (m *ColumnVindex) GetName() string

func (*ColumnVindex) ProtoMessage

func (*ColumnVindex) ProtoMessage()

func (*ColumnVindex) Reset

func (m *ColumnVindex) Reset()

func (*ColumnVindex) String

func (m *ColumnVindex) String() string

func (*ColumnVindex) XXX_DiscardUnknown

func (m *ColumnVindex) XXX_DiscardUnknown()

func (*ColumnVindex) XXX_Marshal

func (m *ColumnVindex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ColumnVindex) XXX_Merge

func (dst *ColumnVindex) XXX_Merge(src proto.Message)

func (*ColumnVindex) XXX_Size

func (m *ColumnVindex) XXX_Size() int

func (*ColumnVindex) XXX_Unmarshal

func (m *ColumnVindex) XXX_Unmarshal(b []byte) error

type Keyspace

type Keyspace struct {
	// If sharded is false, vindexes and tables are ignored.
	Sharded              bool               `protobuf:"varint,1,opt,name=sharded,proto3" json:"sharded,omitempty"`
	Vindexes             map[string]*Vindex `` /* 157-byte string literal not displayed */
	Tables               map[string]*Table  `` /* 153-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

Keyspace is the vschema for a keyspace.

func (*Keyspace) Descriptor

func (*Keyspace) Descriptor() ([]byte, []int)

func (*Keyspace) GetSharded

func (m *Keyspace) GetSharded() bool

func (*Keyspace) GetTables

func (m *Keyspace) GetTables() map[string]*Table

func (*Keyspace) GetVindexes

func (m *Keyspace) GetVindexes() map[string]*Vindex

func (*Keyspace) ProtoMessage

func (*Keyspace) ProtoMessage()

func (*Keyspace) Reset

func (m *Keyspace) Reset()

func (*Keyspace) String

func (m *Keyspace) String() string

func (*Keyspace) XXX_DiscardUnknown

func (m *Keyspace) XXX_DiscardUnknown()

func (*Keyspace) XXX_Marshal

func (m *Keyspace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Keyspace) XXX_Merge

func (dst *Keyspace) XXX_Merge(src proto.Message)

func (*Keyspace) XXX_Size

func (m *Keyspace) XXX_Size() int

func (*Keyspace) XXX_Unmarshal

func (m *Keyspace) XXX_Unmarshal(b []byte) error

type SrvVSchema

type SrvVSchema struct {
	// keyspaces is a map of keyspace name -> Keyspace object.
	Keyspaces            map[string]*Keyspace `` /* 159-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

SrvVSchema is the roll-up of all the Keyspace schema for a cell.

func (*SrvVSchema) Descriptor

func (*SrvVSchema) Descriptor() ([]byte, []int)

func (*SrvVSchema) GetKeyspaces

func (m *SrvVSchema) GetKeyspaces() map[string]*Keyspace

func (*SrvVSchema) ProtoMessage

func (*SrvVSchema) ProtoMessage()

func (*SrvVSchema) Reset

func (m *SrvVSchema) Reset()

func (*SrvVSchema) String

func (m *SrvVSchema) String() string

func (*SrvVSchema) XXX_DiscardUnknown

func (m *SrvVSchema) XXX_DiscardUnknown()

func (*SrvVSchema) XXX_Marshal

func (m *SrvVSchema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SrvVSchema) XXX_Merge

func (dst *SrvVSchema) XXX_Merge(src proto.Message)

func (*SrvVSchema) XXX_Size

func (m *SrvVSchema) XXX_Size() int

func (*SrvVSchema) XXX_Unmarshal

func (m *SrvVSchema) XXX_Unmarshal(b []byte) error

type Table

type Table struct {
	// If the table is a sequence, type must be
	// "sequence". Otherwise, it should be empty.
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	// column_vindexes associates columns to vindexes.
	ColumnVindexes []*ColumnVindex `protobuf:"bytes,2,rep,name=column_vindexes,json=columnVindexes,proto3" json:"column_vindexes,omitempty"`
	// auto_increment is specified if a column needs
	// to be associated with a sequence.
	AutoIncrement *AutoIncrement `protobuf:"bytes,3,opt,name=auto_increment,json=autoIncrement,proto3" json:"auto_increment,omitempty"`
	// columns lists the columns for the table.
	Columns []*Column `protobuf:"bytes,4,rep,name=columns,proto3" json:"columns,omitempty"`
	// pinned pins an unsharded table to a specific
	// shard, as dictated by the keyspace id.
	// The keyspace id is represened in hex form
	// like in keyranges.
	Pinned string `protobuf:"bytes,5,opt,name=pinned,proto3" json:"pinned,omitempty"`
	// column_list_authoritative is set to true if columns is
	// an authoritative list for the table. This allows
	// us to expand 'select *' expressions.
	ColumnListAuthoritative bool     `` /* 133-byte string literal not displayed */
	XXX_NoUnkeyedLiteral    struct{} `json:"-"`
	XXX_unrecognized        []byte   `json:"-"`
	XXX_sizecache           int32    `json:"-"`
}

Table is the table info for a Keyspace.

func (*Table) Descriptor

func (*Table) Descriptor() ([]byte, []int)

func (*Table) GetAutoIncrement

func (m *Table) GetAutoIncrement() *AutoIncrement

func (*Table) GetColumnListAuthoritative

func (m *Table) GetColumnListAuthoritative() bool

func (*Table) GetColumnVindexes

func (m *Table) GetColumnVindexes() []*ColumnVindex

func (*Table) GetColumns

func (m *Table) GetColumns() []*Column

func (*Table) GetPinned

func (m *Table) GetPinned() string

func (*Table) GetType

func (m *Table) GetType() string

func (*Table) ProtoMessage

func (*Table) ProtoMessage()

func (*Table) Reset

func (m *Table) Reset()

func (*Table) String

func (m *Table) String() string

func (*Table) XXX_DiscardUnknown

func (m *Table) XXX_DiscardUnknown()

func (*Table) XXX_Marshal

func (m *Table) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Table) XXX_Merge

func (dst *Table) XXX_Merge(src proto.Message)

func (*Table) XXX_Size

func (m *Table) XXX_Size() int

func (*Table) XXX_Unmarshal

func (m *Table) XXX_Unmarshal(b []byte) error

type Vindex

type Vindex struct {
	// The type must match one of the predefined
	// (or plugged in) vindex names.
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	// params is a map of attribute value pairs
	// that must be defined as required by the
	// vindex constructors. The values can only
	// be strings.
	Params map[string]string `` /* 153-byte string literal not displayed */
	// A lookup vindex can have an owner table defined.
	// If so, rows in the lookup table are created or
	// deleted in sync with corresponding rows in the
	// owner table.
	Owner                string   `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Vindex is the vindex info for a Keyspace.

func (*Vindex) Descriptor

func (*Vindex) Descriptor() ([]byte, []int)

func (*Vindex) GetOwner

func (m *Vindex) GetOwner() string

func (*Vindex) GetParams

func (m *Vindex) GetParams() map[string]string

func (*Vindex) GetType

func (m *Vindex) GetType() string

func (*Vindex) ProtoMessage

func (*Vindex) ProtoMessage()

func (*Vindex) Reset

func (m *Vindex) Reset()

func (*Vindex) String

func (m *Vindex) String() string

func (*Vindex) XXX_DiscardUnknown

func (m *Vindex) XXX_DiscardUnknown()

func (*Vindex) XXX_Marshal

func (m *Vindex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Vindex) XXX_Merge

func (dst *Vindex) XXX_Merge(src proto.Message)

func (*Vindex) XXX_Size

func (m *Vindex) XXX_Size() int

func (*Vindex) XXX_Unmarshal

func (m *Vindex) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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