vschema

package
v2.2.0-rc.1+incompatible Latest Latest
Warning

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

Go to latest
Published: May 18, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package vschema is a generated protocol buffer package.

It is generated from these files:

vschema.proto

It has these top-level messages:

Keyspace
Vindex
Table
ColumnVindex
AutoIncrement
Column
SrvVSchema

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" json:"column,omitempty"`
	// The sequence must match a table of type SEQUENCE.
	Sequence string `protobuf:"bytes,2,opt,name=sequence" json:"sequence,omitempty"`
}

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

type Column

type Column struct {
	Name string     `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Type query.Type `protobuf:"varint,2,opt,name=type,enum=query.Type" json:"type,omitempty"`
}

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

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" json:"column,omitempty"`
	// The name must match a vindex defined in Keyspace.
	Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
	// List of columns that define this Vindex
	Columns []string `protobuf:"bytes,3,rep,name=columns" json:"columns,omitempty"`
}

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

type Keyspace

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

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

type SrvVSchema

type SrvVSchema struct {
	// keyspaces is a map of keyspace name -> Keyspace object.
	Keyspaces map[string]*Keyspace `` /* 138-byte string literal not displayed */
}

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

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" json:"type,omitempty"`
	// column_vindexes associates columns to vindexes.
	ColumnVindexes []*ColumnVindex `protobuf:"bytes,2,rep,name=column_vindexes,json=columnVindexes" 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" json:"auto_increment,omitempty"`
	// columns lists the columns for the table.
	Columns []*Column `protobuf:"bytes,4,rep,name=columns" json:"columns,omitempty"`
}

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) GetColumnVindexes

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

func (*Table) GetColumns

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

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

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" 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 `` /* 132-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" json:"owner,omitempty"`
}

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

Jump to

Keyboard shortcuts

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