Documentation ¶
Index ¶
- Constants
- Variables
- func NewTimeBucket(args ...sql.Expression) (sql.Expression, error)
- type Auth
- func (a *Auth) AuthMethod(user, addr string) (string, error)
- func (a *Auth) Negotiate(c *mysql.Conn, user string, remoteAddr net.Addr) (mysql.Getter, error)
- func (a *Auth) Salt() ([]byte, error)
- func (a *Auth) ValidateHash(salt []byte, user string, authResponse []byte, remoteAddr net.Addr) (mysql.Getter, error)
- type Context
- type DB
- type Engine
- type Handler
- func (h *Handler) ComInitDB(c *mysql.Conn, schemaName string) error
- func (h *Handler) ComMultiQuery(c *mysql.Conn, query string, callback func(*sqltypes.Result, bool) error) (string, error)
- func (h *Handler) ComPrepare(c *mysql.Conn, query string) ([]*query.Field, error)
- func (h *Handler) ComQuery(c *mysql.Conn, query string, callback func(*sqltypes.Result, bool) error) error
- func (h *Handler) ComResetConnection(c *mysql.Conn)
- func (h *Handler) ComStmtExecute(c *mysql.Conn, prepare *mysql.PrepareData, ...) error
- func (h *Handler) ConnectionClosed(c *mysql.Conn)
- func (h *Handler) NewConnection(c *mysql.Conn)
- func (h *Handler) ParserOptionsForConnection(c *mysql.Conn) (sqlparser.ParserOptions, error)
- func (h *Handler) WarningCount(c *mysql.Conn) uint16
- type Index
- func (idx *Index) CanSupport(...sql.Range) bool
- func (idx *Index) ColumnExpressionTypes() []sql.ColumnExpressionType
- func (idx *Index) ColumnExpressions() []sql.Expression
- func (idx *Index) Comment() string
- func (idx *Index) Database() string
- func (idx *Index) Expressions() []string
- func (idx *Index) ExtendedColumnExpressionTypes() []sql.ColumnExpressionType
- func (idx *Index) ExtendedExpressions() []string
- func (idx *Index) ID() string
- func (idx *Index) IndexType() string
- func (idx *Index) IsFullText() bool
- func (idx *Index) IsGenerated() bool
- func (idx *Index) IsSpatial() bool
- func (idx *Index) IsUnique() bool
- func (idx *Index) PrefixLengths() []uint16
- func (idx *Index) Table() string
- type IndexedTable
- type MultiStmtMode
- type Partition
- type Provider
- type Server
- type StaticUserData
- type Table
- func (t *Table) Collation() sql.CollationID
- func (t *Table) GetIndexes(ctx *sql.Context) ([]sql.Index, error)
- func (t *Table) IndexedAccess(i sql.IndexLookup) sql.IndexedTable
- func (t *Table) Name() string
- func (t *Table) PartitionRows(ctx *sql.Context, partition sql.Partition) (sql.RowIter, error)
- func (t *Table) Partitions(*sql.Context) (sql.PartitionIter, error)
- func (t *Table) Projections() (o []string)
- func (t *Table) Schema() sql.Schema
- func (t *Table) String() string
- func (t *Table) WithProjections(colNames []string) sql.Table
- type TimeBucket
- func (t *TimeBucket) Children() []sql.Expression
- func (t *TimeBucket) Description() string
- func (t *TimeBucket) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (t *TimeBucket) FunctionName() string
- func (t *TimeBucket) IsNullable() bool
- func (t *TimeBucket) Resolved() bool
- func (t *TimeBucket) String() string
- func (t *TimeBucket) Type() sql.Type
- func (t *TimeBucket) WithChildren(children ...sql.Expression) (sql.Expression, error)
Constants ¶
const TimeBucketName = "time_bucket"
Variables ¶
var ( // ErrRowTimeout will be returned if the wait for the row is longer than the connection timeout ErrRowTimeout = errors.NewKind("row read wait bigger than connection timeout") // ErrConnectionWasClosed will be returned if we try to use a previously closed connection ErrConnectionWasClosed = errors.NewKind("connection was closed") )
var Columns, Indexed = func() (o []storev1.Column, idx map[string]bool) {
idx = make(map[string]bool)
for i := storev1.Column_bounce; i <= storev1.Column_utm_term; i++ {
if i > storev1.Column_timestamp {
idx[i.String()] = true
}
o = append(o, i)
}
return
}()
Functions ¶
func NewTimeBucket ¶ added in v0.0.40
func NewTimeBucket(args ...sql.Expression) (sql.Expression, error)
Types ¶
type Auth ¶
type Auth struct { DB db.Provider PrivateKey ed25519.PrivateKey }
type DB ¶ added in v0.0.28
type DB struct {
Context
}
func (*DB) GetTableInsensitive ¶ added in v0.0.28
func (*DB) GetTableNames ¶ added in v0.0.28
func (DB) IsReadOnly ¶ added in v0.0.28
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is a connection handler for a SQLe engine, implementing the Vitess mysql.Handler interface.
func (*Handler) ComMultiQuery ¶
func (*Handler) ComPrepare ¶
ComPrepare parses, partially analyzes, and caches a prepared statement's plan with the given [c.ConnectionID].
func (*Handler) ComQuery ¶
func (h *Handler) ComQuery( c *mysql.Conn, query string, callback func(*sqltypes.Result, bool) error, ) error
ComQuery executes a SQL query on the SQLe engine.
func (*Handler) ComResetConnection ¶
func (*Handler) ComStmtExecute ¶
func (*Handler) ConnectionClosed ¶
ConnectionClosed reports that a connection has been closed.
func (*Handler) NewConnection ¶
NewConnection reports that a new connection has been established.
func (*Handler) ParserOptionsForConnection ¶
func (*Handler) WarningCount ¶
WarningCount is called at the end of each query to obtain the value to be returned to the client in the EOF packet. Note that this will be called either in the context of the ComQuery callback if the result does not contain any fields, or after the last ComQuery call completes.
type Index ¶ added in v0.0.38
type Index struct { DB string // required for engine tests with driver Tbl *Table // required for engine tests with driver TableName string Name string Exprs []sql.Expression PrefixLens []uint16 // contains filtered or unexported fields }
func (*Index) ColumnExpressionTypes ¶ added in v0.0.38
func (idx *Index) ColumnExpressionTypes() []sql.ColumnExpressionType
func (*Index) ColumnExpressions ¶ added in v0.0.38
func (idx *Index) ColumnExpressions() []sql.Expression
func (*Index) Expressions ¶ added in v0.0.38
func (*Index) ExtendedColumnExpressionTypes ¶ added in v0.0.38
func (idx *Index) ExtendedColumnExpressionTypes() []sql.ColumnExpressionType
func (*Index) ExtendedExpressions ¶ added in v0.0.38
func (*Index) IsFullText ¶ added in v0.0.38
func (*Index) IsGenerated ¶ added in v0.0.38
func (*Index) PrefixLengths ¶ added in v0.0.38
type IndexedTable ¶ added in v0.0.38
type IndexedTable struct { *Table Lookup sql.IndexLookup }
func (*IndexedTable) LookupPartitions ¶ added in v0.0.38
func (t *IndexedTable) LookupPartitions(ctx *sql.Context, lookup sql.IndexLookup) (sql.PartitionIter, error)
func (*IndexedTable) PartitionRows ¶ added in v0.0.38
func (t *IndexedTable) PartitionRows(ctx *sql.Context, partition sql.Partition) (sql.RowIter, error)
PartitionRows implements the sql.PartitionRows interface.
type MultiStmtMode ¶ added in v0.0.38
type MultiStmtMode int
const ( MultiStmtModeOff MultiStmtMode = 0 MultiStmtModeOn MultiStmtMode = 1 )
type Partition ¶ added in v0.0.28
type Partition struct { BlockID []byte BlockIndex *blocksv1.BlockIndex RowGroups []int }
func (*Partition) Index ¶ added in v0.0.40
func (p *Partition) Index() *blocksv1.BlockIndex
type Provider ¶
type Provider struct {
Context
}
type StaticUserData ¶
type StaticUserData string
func (StaticUserData) Get ¶
func (sud StaticUserData) Get() *querypb.VTGateCallerID
Get returns the wrapped username and groups
type Table ¶
type Table struct { Context // contains filtered or unexported fields }
func (*Table) Collation ¶ added in v0.0.28
func (t *Table) Collation() sql.CollationID
func (*Table) GetIndexes ¶ added in v0.0.38
func (*Table) IndexedAccess ¶ added in v0.0.38
func (t *Table) IndexedAccess(i sql.IndexLookup) sql.IndexedTable
func (*Table) PartitionRows ¶ added in v0.0.28
func (*Table) Partitions ¶ added in v0.0.28
func (*Table) Projections ¶ added in v0.0.28
type TimeBucket ¶ added in v0.0.40
type TimeBucket struct {
// contains filtered or unexported fields
}
func (*TimeBucket) Children ¶ added in v0.0.40
func (t *TimeBucket) Children() []sql.Expression
Children implements the sql.Expression interface.
func (*TimeBucket) Description ¶ added in v0.0.40
func (t *TimeBucket) Description() string
Description implements sql.FunctionExpression
func (*TimeBucket) FunctionName ¶ added in v0.0.40
func (t *TimeBucket) FunctionName() string
FunctionName implements sql.FunctionExpression
func (*TimeBucket) IsNullable ¶ added in v0.0.40
func (t *TimeBucket) IsNullable() bool
IsNullable implements the sql.Expression interface.
func (*TimeBucket) Resolved ¶ added in v0.0.40
func (t *TimeBucket) Resolved() bool
Resolved implements the sql.Expression interface.
func (*TimeBucket) String ¶ added in v0.0.40
func (t *TimeBucket) String() string
func (*TimeBucket) Type ¶ added in v0.0.40
func (t *TimeBucket) Type() sql.Type
Type implements the sql.Expression interface.
func (*TimeBucket) WithChildren ¶ added in v0.0.40
func (t *TimeBucket) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.