Documentation ¶
Index ¶
- Constants
- Variables
- func BuildValueFilter(ctx context.Context, f []ValueFilter, source func(v1.Column) arrow.Array) (arrow.Array, error)
- func NewTimeBucket(args ...sql.Expression) (sql.Expression, error)
- type DB
- func (db *DB) AllViews(ctx *sql.Context) ([]sql.ViewDefinition, error)
- func (db *DB) CreateView(ctx *sql.Context, name string, selectStatement, createViewStmt string) error
- func (db *DB) DropView(ctx *sql.Context, name string) error
- func (db *DB) GetTableInsensitive(ctx *sql.Context, tblName string) (table sql.Table, ok bool, err error)
- func (db *DB) GetTableNames(ctx *sql.Context) (names []string, err error)
- func (db *DB) GetViewDefinition(ctx *sql.Context, viewName string) (sql.ViewDefinition, bool, error)
- func (DB) IsReadOnly() bool
- func (DB) Name() string
- type Engine
- type FieldHint
- type FilterIndex
- type FilterValue
- type Filters
- 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 IndexFilter
- type IndexFilterResult
- type IndexHint
- type IndexMatchFuncs
- type MultiStmtMode
- type Op
- type Partition
- type PlaintextAuthPluginFunc
- type Provider
- type RowGroups
- type Server
- type Table
- func (t *Table) Collation() sql.CollationID
- func (t *Table) Name() string
- func (t *Table) PartitionRows(ctx *sql.Context, partition sql.Partition) (sql.RowIter, error)
- func (t *Table) Partitions(ctx *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)
- type Value
- type ValueFilter
- type ValueMatchFuncs
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]storev1.Column) {
idx = make(map[string]storev1.Column)
for i := storev1.Column_bounce; i <= storev1.Column_utm_term; i++ {
idx[i.String()] = i
o = append(o, i)
}
return
}()
var ErrNoFilter = errors.New("no filters")
Functions ¶
func BuildValueFilter ¶ added in v0.0.41
func NewTimeBucket ¶ added in v0.0.40
func NewTimeBucket(args ...sql.Expression) (sql.Expression, error)
Types ¶
type DB ¶ added in v0.0.28
type DB struct {
// contains filtered or unexported fields
}
func (*DB) CreateView ¶ added in v0.0.42
func (*DB) GetTableInsensitive ¶ added in v0.0.28
func (*DB) GetTableNames ¶ added in v0.0.28
func (*DB) GetViewDefinition ¶ added in v0.0.42
func (DB) IsReadOnly ¶ added in v0.0.28
type FilterIndex ¶ added in v0.0.41
type FilterValue ¶ added in v0.0.41
type Filters ¶ added in v0.0.42
type Filters struct { Index []IndexFilter Value []ValueFilter }
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 IndexFilter ¶ added in v0.0.41
type IndexFilter interface { Column() v1.Column FilterIndex(ctx context.Context, idx *blocksv1.ColumnIndex) (*RowGroups, error) }
IndexFilter is an interface for choosing row groups and row group pages to read based on a column index.
This filter is first applied before values are read into arrow.Record. Only row groups and row group pages that matches across all IndexFilter are selected for reads
type IndexFilterResult ¶ added in v0.0.42
func BuildIndexFilter ¶ added in v0.0.41
func BuildIndexFilter( ctx context.Context, f []IndexFilter, source func(v1.Column) *blocksv1.ColumnIndex) (*IndexFilterResult, error)
type IndexHint ¶ added in v0.0.42
type IndexHint struct {
Fields []*FieldHint
}
func (*IndexHint) Visit ¶ added in v0.0.42
func (v *IndexHint) Visit(node sql.Node, expr sql.Expression) sql.NodeVisitor
type IndexMatchFuncs ¶ added in v0.0.41
type IndexMatchFuncs struct { Col v1.Column FilterIndexFunc func(ctx context.Context, idx *blocksv1.ColumnIndex) (*RowGroups, error) }
func (*IndexMatchFuncs) Column ¶ added in v0.0.41
func (i *IndexMatchFuncs) Column() v1.Column
func (*IndexMatchFuncs) FilterIndex ¶ added in v0.0.41
func (i *IndexMatchFuncs) FilterIndex(ctx context.Context, idx *blocksv1.ColumnIndex) (*RowGroups, error)
type MultiStmtMode ¶ added in v0.0.38
type MultiStmtMode int
const ( MultiStmtModeOff MultiStmtMode = 0 MultiStmtModeOn MultiStmtMode = 1 )
type PlaintextAuthPluginFunc ¶ added in v0.0.42
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
type RowGroups ¶ added in v0.0.42
type RowGroups struct {
// contains filtered or unexported fields
}
func (*RowGroups) SelectGroup ¶ added in v0.0.42
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
func (*Table) Collation ¶ added in v0.0.28
func (t *Table) Collation() sql.CollationID
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.
type ValueFilter ¶ added in v0.0.41
type ValueMatchFuncs ¶ added in v0.0.41
type ValueMatchFuncs struct { Col v1.Column FilterValueFunc func(ctx context.Context, value arrow.Array) (arrow.Array, error) }
func (*ValueMatchFuncs) Column ¶ added in v0.0.41
func (i *ValueMatchFuncs) Column() v1.Column