Versions in this module Expand all Collapse all v1 v1.0.0 Oct 16, 2017 Changes in this version + type ColumnInfo struct + Charset uint16 + ColumnLength uint32 + Decimal uint8 + DefaultValue []byte + DefaultValueLength uint64 + Flag uint16 + Name string + OrgName string + OrgTable string + Schema string + Table string + Type uint8 + func (column *ColumnInfo) Dump(alloc arena.Allocator) []byte + type FrameItem struct + DBName string + IndexID int64 + IndexName string + IsRecord bool + TableID int64 + TableName string + func NewFrameItemFromRegionKey(key []byte) (frame *FrameItem, err error) + type IDriver interface + OpenCtx func(connID uint64, capability uint32, collation uint8, dbname string, ...) (QueryCtx, error) + type IndexRegions struct + ID int64 + Name string + Regions []RegionMeta + type PreparedStatement interface + AppendParam func(paramID int, data []byte) error + BoundParams func() [][]byte + Close func() error + Execute func(args ...interface{}) (ResultSet, error) + GetParamsType func() []byte + ID func() int + NumParams func() int + Reset func() + SetParamsType func([]byte) + type QueryCtx interface + AffectedRows func() uint64 + Auth func(user *auth.UserIdentity, auth []byte, salt []byte) bool + Cancel func() + Close func() error + CommitTxn func() error + CurrentDB func() string + Execute func(sql string) ([]ResultSet, error) + FieldList func(tableName string) (columns []*ColumnInfo, err error) + GetStatement func(stmtID int) PreparedStatement + LastInsertID func() uint64 + Prepare func(sql string) (statement PreparedStatement, columns, params []*ColumnInfo, err error) + RollbackTxn func() error + SetClientCapability func(uint32) + SetSessionManager func(util.SessionManager) + SetValue func(key fmt.Stringer, value interface{}) + ShowProcess func() util.ProcessInfo + Status func() uint16 + Value func(key fmt.Stringer) interface{} + WarningCount func() uint16 + type RegionDetail struct + EndKey []byte + Frames []FrameItem + RegionID uint64 + StartKey []byte + type RegionFrameRange struct + func NewRegionFrameRange(region *tikv.KeyLocation) (idxRange *RegionFrameRange, err error) + type RegionMeta struct + ID uint64 + Leader *metapb.Peer + Peers []*metapb.Peer + RegionEpoch *metapb.RegionEpoch + type ResultSet interface + Close func() error + Columns func() ([]*ColumnInfo, error) + Next func() ([]types.Datum, error) + type Server struct + func NewServer(cfg *config.Config, driver IDriver) (*Server, error) + func (s *Server) Close() + func (s *Server) ConnectionCount() int + func (s *Server) Kill(connectionID uint64, query bool) + func (s *Server) Run() error + func (s *Server) ShowProcessList() []util.ProcessInfo + type TableRegions struct + Indices []IndexRegions + RecordRegions []RegionMeta + TableID int64 + TableName string + type TiDBContext struct + func (tc *TiDBContext) AffectedRows() uint64 + func (tc *TiDBContext) Auth(user *auth.UserIdentity, auth []byte, salt []byte) bool + func (tc *TiDBContext) Cancel() + func (tc *TiDBContext) Close() error + func (tc *TiDBContext) CommitTxn() error + func (tc *TiDBContext) CurrentDB() string + func (tc *TiDBContext) Execute(sql string) (rs []ResultSet, err error) + func (tc *TiDBContext) FieldList(table string) (colums []*ColumnInfo, err error) + func (tc *TiDBContext) GetStatement(stmtID int) PreparedStatement + func (tc *TiDBContext) LastInsertID() uint64 + func (tc *TiDBContext) Prepare(sql string) (statement PreparedStatement, columns, params []*ColumnInfo, err error) + func (tc *TiDBContext) RollbackTxn() error + func (tc *TiDBContext) SetClientCapability(flags uint32) + func (tc *TiDBContext) SetSessionManager(sm util.SessionManager) + func (tc *TiDBContext) SetValue(key fmt.Stringer, value interface{}) + func (tc *TiDBContext) ShowProcess() util.ProcessInfo + func (tc *TiDBContext) Status() uint16 + func (tc *TiDBContext) Value(key fmt.Stringer) interface{} + func (tc *TiDBContext) WarningCount() uint16 + type TiDBDriver struct + func NewTiDBDriver(store kv.Storage) *TiDBDriver + func (qd *TiDBDriver) OpenCtx(connID uint64, capability uint32, collation uint8, dbname string, ...) (QueryCtx, error) + type TiDBStatement struct + func (ts *TiDBStatement) AppendParam(paramID int, data []byte) error + func (ts *TiDBStatement) BoundParams() [][]byte + func (ts *TiDBStatement) Close() error + func (ts *TiDBStatement) Execute(args ...interface{}) (rs ResultSet, err error) + func (ts *TiDBStatement) GetParamsType() []byte + func (ts *TiDBStatement) ID() int + func (ts *TiDBStatement) NumParams() int + func (ts *TiDBStatement) Reset() + func (ts *TiDBStatement) SetParamsType(paramsType []byte) + type Token struct + type TokenLimiter struct + func NewTokenLimiter(count int) *TokenLimiter + func (tl *TokenLimiter) Get() *Token + func (tl *TokenLimiter) Put(tk *Token)