vschema

package
v0.16.3 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: Apache-2.0 Imports: 8 Imported by: 25

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLength        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflow          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)
View Source
var File_vschema_proto protoreflect.FileDescriptor

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"`
	// contains filtered or unexported fields
}

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

func (*AutoIncrement) Descriptor deprecated

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

Deprecated: Use AutoIncrement.ProtoReflect.Descriptor instead.

func (*AutoIncrement) GetColumn

func (x *AutoIncrement) GetColumn() string

func (*AutoIncrement) GetSequence

func (x *AutoIncrement) GetSequence() string

func (*AutoIncrement) MarshalToSizedBufferVT added in v0.11.0

func (m *AutoIncrement) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*AutoIncrement) MarshalToVT added in v0.11.0

func (m *AutoIncrement) MarshalToVT(dAtA []byte) (int, error)

func (*AutoIncrement) MarshalVT added in v0.11.0

func (m *AutoIncrement) MarshalVT() (dAtA []byte, err error)

func (*AutoIncrement) ProtoMessage

func (*AutoIncrement) ProtoMessage()

func (*AutoIncrement) ProtoReflect added in v0.11.0

func (x *AutoIncrement) ProtoReflect() protoreflect.Message

func (*AutoIncrement) Reset

func (x *AutoIncrement) Reset()

func (*AutoIncrement) SizeVT added in v0.11.0

func (m *AutoIncrement) SizeVT() (n int)

func (*AutoIncrement) String

func (x *AutoIncrement) String() string

func (*AutoIncrement) UnmarshalVT added in v0.11.0

func (m *AutoIncrement) UnmarshalVT(dAtA []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"`
	// contains filtered or unexported fields
}

Column describes a column.

func (*Column) Descriptor deprecated

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

Deprecated: Use Column.ProtoReflect.Descriptor instead.

func (*Column) GetName

func (x *Column) GetName() string

func (*Column) GetType

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

func (*Column) MarshalToSizedBufferVT added in v0.11.0

func (m *Column) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Column) MarshalToVT added in v0.11.0

func (m *Column) MarshalToVT(dAtA []byte) (int, error)

func (*Column) MarshalVT added in v0.11.0

func (m *Column) MarshalVT() (dAtA []byte, err error)

func (*Column) ProtoMessage

func (*Column) ProtoMessage()

func (*Column) ProtoReflect added in v0.11.0

func (x *Column) ProtoReflect() protoreflect.Message

func (*Column) Reset

func (x *Column) Reset()

func (*Column) SizeVT added in v0.11.0

func (m *Column) SizeVT() (n int)

func (*Column) String

func (x *Column) String() string

func (*Column) UnmarshalVT added in v0.11.0

func (m *Column) UnmarshalVT(dAtA []byte) error

type ColumnVindex

type ColumnVindex struct {

	// Legacy implementation, 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"`
	// contains filtered or unexported fields
}

ColumnVindex is used to associate a column to a vindex.

func (*ColumnVindex) Descriptor deprecated

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

Deprecated: Use ColumnVindex.ProtoReflect.Descriptor instead.

func (*ColumnVindex) GetColumn

func (x *ColumnVindex) GetColumn() string

func (*ColumnVindex) GetColumns

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

func (*ColumnVindex) GetName

func (x *ColumnVindex) GetName() string

func (*ColumnVindex) MarshalToSizedBufferVT added in v0.11.0

func (m *ColumnVindex) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ColumnVindex) MarshalToVT added in v0.11.0

func (m *ColumnVindex) MarshalToVT(dAtA []byte) (int, error)

func (*ColumnVindex) MarshalVT added in v0.11.0

func (m *ColumnVindex) MarshalVT() (dAtA []byte, err error)

func (*ColumnVindex) ProtoMessage

func (*ColumnVindex) ProtoMessage()

func (*ColumnVindex) ProtoReflect added in v0.11.0

func (x *ColumnVindex) ProtoReflect() protoreflect.Message

func (*ColumnVindex) Reset

func (x *ColumnVindex) Reset()

func (*ColumnVindex) SizeVT added in v0.11.0

func (m *ColumnVindex) SizeVT() (n int)

func (*ColumnVindex) String

func (x *ColumnVindex) String() string

func (*ColumnVindex) UnmarshalVT added in v0.11.0

func (m *ColumnVindex) UnmarshalVT(dAtA []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 */
	// If require_explicit_routing is true, vindexes and tables are not added to global routing
	RequireExplicitRouting bool `` /* 130-byte string literal not displayed */
	// contains filtered or unexported fields
}

Keyspace is the vschema for a keyspace.

func (*Keyspace) Descriptor deprecated

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

Deprecated: Use Keyspace.ProtoReflect.Descriptor instead.

func (*Keyspace) GetRequireExplicitRouting

func (x *Keyspace) GetRequireExplicitRouting() bool

func (*Keyspace) GetSharded

func (x *Keyspace) GetSharded() bool

func (*Keyspace) GetTables

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

func (*Keyspace) GetVindexes

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

func (*Keyspace) MarshalToSizedBufferVT added in v0.11.0

func (m *Keyspace) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Keyspace) MarshalToVT added in v0.11.0

func (m *Keyspace) MarshalToVT(dAtA []byte) (int, error)

func (*Keyspace) MarshalVT added in v0.11.0

func (m *Keyspace) MarshalVT() (dAtA []byte, err error)

func (*Keyspace) ProtoMessage

func (*Keyspace) ProtoMessage()

func (*Keyspace) ProtoReflect added in v0.11.0

func (x *Keyspace) ProtoReflect() protoreflect.Message

func (*Keyspace) Reset

func (x *Keyspace) Reset()

func (*Keyspace) SizeVT added in v0.11.0

func (m *Keyspace) SizeVT() (n int)

func (*Keyspace) String

func (x *Keyspace) String() string

func (*Keyspace) UnmarshalVT added in v0.11.0

func (m *Keyspace) UnmarshalVT(dAtA []byte) error

type RoutingRule

type RoutingRule struct {
	FromTable string   `protobuf:"bytes,1,opt,name=from_table,json=fromTable,proto3" json:"from_table,omitempty"`
	ToTables  []string `protobuf:"bytes,2,rep,name=to_tables,json=toTables,proto3" json:"to_tables,omitempty"`
	// contains filtered or unexported fields
}

RoutingRule specifies a routing rule.

func (*RoutingRule) Descriptor deprecated

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

Deprecated: Use RoutingRule.ProtoReflect.Descriptor instead.

func (*RoutingRule) GetFromTable

func (x *RoutingRule) GetFromTable() string

func (*RoutingRule) GetToTables

func (x *RoutingRule) GetToTables() []string

func (*RoutingRule) MarshalToSizedBufferVT added in v0.11.0

func (m *RoutingRule) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*RoutingRule) MarshalToVT added in v0.11.0

func (m *RoutingRule) MarshalToVT(dAtA []byte) (int, error)

func (*RoutingRule) MarshalVT added in v0.11.0

func (m *RoutingRule) MarshalVT() (dAtA []byte, err error)

func (*RoutingRule) ProtoMessage

func (*RoutingRule) ProtoMessage()

func (*RoutingRule) ProtoReflect added in v0.11.0

func (x *RoutingRule) ProtoReflect() protoreflect.Message

func (*RoutingRule) Reset

func (x *RoutingRule) Reset()

func (*RoutingRule) SizeVT added in v0.11.0

func (m *RoutingRule) SizeVT() (n int)

func (*RoutingRule) String

func (x *RoutingRule) String() string

func (*RoutingRule) UnmarshalVT added in v0.11.0

func (m *RoutingRule) UnmarshalVT(dAtA []byte) error

type RoutingRules

type RoutingRules struct {

	// rules should ideally be a map. However protos dont't allow
	// repeated fields as elements of a map. So, we use a list
	// instead.
	Rules []*RoutingRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"`
	// contains filtered or unexported fields
}

RoutingRules specify the high level routing rules for the VSchema.

func (*RoutingRules) Descriptor deprecated

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

Deprecated: Use RoutingRules.ProtoReflect.Descriptor instead.

func (*RoutingRules) GetRules

func (x *RoutingRules) GetRules() []*RoutingRule

func (*RoutingRules) MarshalToSizedBufferVT added in v0.11.0

func (m *RoutingRules) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*RoutingRules) MarshalToVT added in v0.11.0

func (m *RoutingRules) MarshalToVT(dAtA []byte) (int, error)

func (*RoutingRules) MarshalVT added in v0.11.0

func (m *RoutingRules) MarshalVT() (dAtA []byte, err error)

func (*RoutingRules) ProtoMessage

func (*RoutingRules) ProtoMessage()

func (*RoutingRules) ProtoReflect added in v0.11.0

func (x *RoutingRules) ProtoReflect() protoreflect.Message

func (*RoutingRules) Reset

func (x *RoutingRules) Reset()

func (*RoutingRules) SizeVT added in v0.11.0

func (m *RoutingRules) SizeVT() (n int)

func (*RoutingRules) String

func (x *RoutingRules) String() string

func (*RoutingRules) UnmarshalVT added in v0.11.0

func (m *RoutingRules) UnmarshalVT(dAtA []byte) error

type ShardRoutingRule added in v0.15.0

type ShardRoutingRule struct {
	FromKeyspace string `protobuf:"bytes,1,opt,name=from_keyspace,json=fromKeyspace,proto3" json:"from_keyspace,omitempty"`
	ToKeyspace   string `protobuf:"bytes,2,opt,name=to_keyspace,json=toKeyspace,proto3" json:"to_keyspace,omitempty"`
	Shard        string `protobuf:"bytes,3,opt,name=shard,proto3" json:"shard,omitempty"`
	// contains filtered or unexported fields
}

RoutingRule specifies a routing rule.

func (*ShardRoutingRule) Descriptor deprecated added in v0.15.0

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

Deprecated: Use ShardRoutingRule.ProtoReflect.Descriptor instead.

func (*ShardRoutingRule) GetFromKeyspace added in v0.15.0

func (x *ShardRoutingRule) GetFromKeyspace() string

func (*ShardRoutingRule) GetShard added in v0.15.0

func (x *ShardRoutingRule) GetShard() string

func (*ShardRoutingRule) GetToKeyspace added in v0.15.0

func (x *ShardRoutingRule) GetToKeyspace() string

func (*ShardRoutingRule) MarshalToSizedBufferVT added in v0.15.0

func (m *ShardRoutingRule) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ShardRoutingRule) MarshalToVT added in v0.15.0

func (m *ShardRoutingRule) MarshalToVT(dAtA []byte) (int, error)

func (*ShardRoutingRule) MarshalVT added in v0.15.0

func (m *ShardRoutingRule) MarshalVT() (dAtA []byte, err error)

func (*ShardRoutingRule) ProtoMessage added in v0.15.0

func (*ShardRoutingRule) ProtoMessage()

func (*ShardRoutingRule) ProtoReflect added in v0.15.0

func (x *ShardRoutingRule) ProtoReflect() protoreflect.Message

func (*ShardRoutingRule) Reset added in v0.15.0

func (x *ShardRoutingRule) Reset()

func (*ShardRoutingRule) SizeVT added in v0.15.0

func (m *ShardRoutingRule) SizeVT() (n int)

func (*ShardRoutingRule) String added in v0.15.0

func (x *ShardRoutingRule) String() string

func (*ShardRoutingRule) UnmarshalVT added in v0.15.0

func (m *ShardRoutingRule) UnmarshalVT(dAtA []byte) error

type ShardRoutingRules added in v0.15.0

type ShardRoutingRules struct {
	Rules []*ShardRoutingRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"`
	// contains filtered or unexported fields
}

ShardRoutingRules specify the shard routing rules for the VSchema.

func (*ShardRoutingRules) Descriptor deprecated added in v0.15.0

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

Deprecated: Use ShardRoutingRules.ProtoReflect.Descriptor instead.

func (*ShardRoutingRules) GetRules added in v0.15.0

func (x *ShardRoutingRules) GetRules() []*ShardRoutingRule

func (*ShardRoutingRules) MarshalToSizedBufferVT added in v0.15.0

func (m *ShardRoutingRules) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ShardRoutingRules) MarshalToVT added in v0.15.0

func (m *ShardRoutingRules) MarshalToVT(dAtA []byte) (int, error)

func (*ShardRoutingRules) MarshalVT added in v0.15.0

func (m *ShardRoutingRules) MarshalVT() (dAtA []byte, err error)

func (*ShardRoutingRules) ProtoMessage added in v0.15.0

func (*ShardRoutingRules) ProtoMessage()

func (*ShardRoutingRules) ProtoReflect added in v0.15.0

func (x *ShardRoutingRules) ProtoReflect() protoreflect.Message

func (*ShardRoutingRules) Reset added in v0.15.0

func (x *ShardRoutingRules) Reset()

func (*ShardRoutingRules) SizeVT added in v0.15.0

func (m *ShardRoutingRules) SizeVT() (n int)

func (*ShardRoutingRules) String added in v0.15.0

func (x *ShardRoutingRules) String() string

func (*ShardRoutingRules) UnmarshalVT added in v0.15.0

func (m *ShardRoutingRules) UnmarshalVT(dAtA []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 */
	RoutingRules      *RoutingRules        `protobuf:"bytes,2,opt,name=routing_rules,json=routingRules,proto3" json:"routing_rules,omitempty"` // table routing rules
	ShardRoutingRules *ShardRoutingRules   `protobuf:"bytes,3,opt,name=shard_routing_rules,json=shardRoutingRules,proto3" json:"shard_routing_rules,omitempty"`
	// contains filtered or unexported fields
}

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

func (*SrvVSchema) Descriptor deprecated

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

Deprecated: Use SrvVSchema.ProtoReflect.Descriptor instead.

func (*SrvVSchema) GetKeyspaces

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

func (*SrvVSchema) GetRoutingRules

func (x *SrvVSchema) GetRoutingRules() *RoutingRules

func (*SrvVSchema) GetShardRoutingRules added in v0.15.0

func (x *SrvVSchema) GetShardRoutingRules() *ShardRoutingRules

func (*SrvVSchema) MarshalToSizedBufferVT added in v0.11.0

func (m *SrvVSchema) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SrvVSchema) MarshalToVT added in v0.11.0

func (m *SrvVSchema) MarshalToVT(dAtA []byte) (int, error)

func (*SrvVSchema) MarshalVT added in v0.11.0

func (m *SrvVSchema) MarshalVT() (dAtA []byte, err error)

func (*SrvVSchema) ProtoMessage

func (*SrvVSchema) ProtoMessage()

func (*SrvVSchema) ProtoReflect added in v0.11.0

func (x *SrvVSchema) ProtoReflect() protoreflect.Message

func (*SrvVSchema) Reset

func (x *SrvVSchema) Reset()

func (*SrvVSchema) SizeVT added in v0.11.0

func (m *SrvVSchema) SizeVT() (n int)

func (*SrvVSchema) String

func (x *SrvVSchema) String() string

func (*SrvVSchema) UnmarshalVT added in v0.11.0

func (m *SrvVSchema) UnmarshalVT(dAtA []byte) error

type Table

type Table struct {

	// If the table is a sequence, type must be
	// "sequence".
	//
	// If the table is a reference, type must be
	// "reference".
	// See https://vitess.io/docs/reference/features/vschema/#reference-tables.
	//
	// 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 represented 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 */
	// reference tables may optionally indicate their source table.
	Source string `protobuf:"bytes,7,opt,name=source,proto3" json:"source,omitempty"`
	// contains filtered or unexported fields
}

Table is the table info for a Keyspace.

func (*Table) Descriptor deprecated

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

Deprecated: Use Table.ProtoReflect.Descriptor instead.

func (*Table) GetAutoIncrement

func (x *Table) GetAutoIncrement() *AutoIncrement

func (*Table) GetColumnListAuthoritative

func (x *Table) GetColumnListAuthoritative() bool

func (*Table) GetColumnVindexes

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

func (*Table) GetColumns

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

func (*Table) GetPinned

func (x *Table) GetPinned() string

func (*Table) GetSource added in v0.16.0

func (x *Table) GetSource() string

func (*Table) GetType

func (x *Table) GetType() string

func (*Table) MarshalToSizedBufferVT added in v0.11.0

func (m *Table) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Table) MarshalToVT added in v0.11.0

func (m *Table) MarshalToVT(dAtA []byte) (int, error)

func (*Table) MarshalVT added in v0.11.0

func (m *Table) MarshalVT() (dAtA []byte, err error)

func (*Table) ProtoMessage

func (*Table) ProtoMessage()

func (*Table) ProtoReflect added in v0.11.0

func (x *Table) ProtoReflect() protoreflect.Message

func (*Table) Reset

func (x *Table) Reset()

func (*Table) SizeVT added in v0.11.0

func (m *Table) SizeVT() (n int)

func (*Table) String

func (x *Table) String() string

func (*Table) UnmarshalVT added in v0.11.0

func (m *Table) UnmarshalVT(dAtA []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"`
	// contains filtered or unexported fields
}

Vindex is the vindex info for a Keyspace.

func (*Vindex) Descriptor deprecated

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

Deprecated: Use Vindex.ProtoReflect.Descriptor instead.

func (*Vindex) GetOwner

func (x *Vindex) GetOwner() string

func (*Vindex) GetParams

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

func (*Vindex) GetType

func (x *Vindex) GetType() string

func (*Vindex) MarshalToSizedBufferVT added in v0.11.0

func (m *Vindex) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Vindex) MarshalToVT added in v0.11.0

func (m *Vindex) MarshalToVT(dAtA []byte) (int, error)

func (*Vindex) MarshalVT added in v0.11.0

func (m *Vindex) MarshalVT() (dAtA []byte, err error)

func (*Vindex) ProtoMessage

func (*Vindex) ProtoMessage()

func (*Vindex) ProtoReflect added in v0.11.0

func (x *Vindex) ProtoReflect() protoreflect.Message

func (*Vindex) Reset

func (x *Vindex) Reset()

func (*Vindex) SizeVT added in v0.11.0

func (m *Vindex) SizeVT() (n int)

func (*Vindex) String

func (x *Vindex) String() string

func (*Vindex) UnmarshalVT added in v0.11.0

func (m *Vindex) UnmarshalVT(dAtA []byte) error

Jump to

Keyboard shortcuts

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