Documentation ¶
Index ¶
- Constants
- Variables
- func Compile(src string) ([]stmt.Statement, error)
- func CompilePrepare(src string) (stmt.Statement, []*expressions.ParamMarker, error)
- func IsQuery(sql string) bool
- func NewStore(uri string) (kv.Storage, error)
- func RegisterDriver()
- func RegisterLocalStore(name string, driver engine.Driver) error
- func RegisterStore(name string, driver kv.Driver) error
- type Session
Constants ¶
const ( EngineGoLevelDBMemory = "memory://" EngineGoLevelDBPersistent = "goleveldb://" EngineHBase = "zk://" EngineBoltDB = "boltdb://" )
Engine prefix name
const (
// DriverName is name of TiDB driver.
DriverName = "tidb"
)
Variables ¶
var ( // Debug is the switch for pprof. If Debug is true, tidb will start with pprof on. Debug = true // PprofAddr is the pprof url. PprofAddr = "localhost:8888" )
Functions ¶
func CompilePrepare ¶
func CompilePrepare(src string) (stmt.Statement, []*expressions.ParamMarker, error)
CompilePrepare compiles prepared statement, allows placeholder as expr. The return values are compiled statement, parameter list and error.
func NewStore ¶
NewStore creates a kv Storage with specific uri. The uri format must be engine://schema, like goleveldb://testpath Engine is the storage name registered with RegisterStore. Schema is the storage specific format.
func RegisterDriver ¶
func RegisterDriver()
RegisterDriver registers TiDB driver. The name argument can be optionally prefixed by "engine://". In that case the prefix is recognized as a storage engine name.
The name argument can be optionally prefixed by "memory://". In that case the prefix is stripped before interpreting it as a name of a memory-only, volatile DB.
[0]: http://golang.org/pkg/database/sql/driver/
func RegisterLocalStore ¶
RegisterLocalStore registers a local kv storage with unique name and its associated engine Driver.
Types ¶
type Session ¶
type Session interface { Status() uint16 // Flag of current status, such as autocommit LastInsertID() uint64 // Last inserted auto_increment id AffectedRows() uint64 // Affected rows by lastest executed stmt Execute(sql string) ([]rset.Recordset, error) // Execute a sql statement SetUsername(name string) // Current user name String() string // For debug FinishTxn(rollback bool) error // For execute prepare statement in binary protocol PrepareStmt(sql string) (stmtID uint32, paramCount int, fields []*field.ResultField, err error) // Execute a prepared statement ExecutePreparedStmt(stmtID uint32, param ...interface{}) (rset.Recordset, error) DropPreparedStmt(stmtID uint32) error SetClientCapability(uint32) // Set client capability flags Close() error }
Session context
Directories ¶
Path | Synopsis |
---|---|
Godeps
|
|
_workspace/src/github.com/golang/snappy
Package snappy implements the snappy block-based compression format.
|
Package snappy implements the snappy block-based compression format. |
_workspace/src/github.com/juju/errors
[godoc-link-here]
|
[godoc-link-here] |
_workspace/src/github.com/ngaut/bolt
Package bolt implements a low-level key/value store in pure Go.
|
Package bolt implements a low-level key/value store in pure Go. |
_workspace/src/github.com/ngaut/log
high level log wrapper, so it can output different log based on level
|
high level log wrapper, so it can output different log based on level |
_workspace/src/github.com/peterh/liner
Package liner implements a simple command line editor, inspired by linenoise (https://github.com/antirez/linenoise/).
|
Package liner implements a simple command line editor, inspired by linenoise (https://github.com/antirez/linenoise/). |
_workspace/src/github.com/pingcap/check
Package check is a rich testing extension for Go's testing package.
|
Package check is a rich testing extension for Go's testing package. |
_workspace/src/github.com/syndtr/goleveldb/leveldb
Package leveldb provides implementation of LevelDB key/value database.
|
Package leveldb provides implementation of LevelDB key/value database. |
_workspace/src/github.com/syndtr/goleveldb/leveldb/cache
Package cache provides interface and implementation of a cache algorithms.
|
Package cache provides interface and implementation of a cache algorithms. |
_workspace/src/github.com/syndtr/goleveldb/leveldb/comparer
Package comparer provides interface and implementation for ordering sets of data.
|
Package comparer provides interface and implementation for ordering sets of data. |
_workspace/src/github.com/syndtr/goleveldb/leveldb/errors
Package errors provides common error types used throughout leveldb.
|
Package errors provides common error types used throughout leveldb. |
_workspace/src/github.com/syndtr/goleveldb/leveldb/filter
Package filter provides interface and implementation of probabilistic data structure.
|
Package filter provides interface and implementation of probabilistic data structure. |
_workspace/src/github.com/syndtr/goleveldb/leveldb/iterator
Package iterator provides interface and implementation to traverse over contents of a database.
|
Package iterator provides interface and implementation to traverse over contents of a database. |
_workspace/src/github.com/syndtr/goleveldb/leveldb/journal
Package journal reads and writes sequences of journals.
|
Package journal reads and writes sequences of journals. |
_workspace/src/github.com/syndtr/goleveldb/leveldb/memdb
Package memdb provides in-memory key/value database implementation.
|
Package memdb provides in-memory key/value database implementation. |
_workspace/src/github.com/syndtr/goleveldb/leveldb/opt
Package opt provides sets of options used by LevelDB.
|
Package opt provides sets of options used by LevelDB. |
_workspace/src/github.com/syndtr/goleveldb/leveldb/storage
Package storage provides storage abstraction for LevelDB.
|
Package storage provides storage abstraction for LevelDB. |
_workspace/src/github.com/syndtr/goleveldb/leveldb/table
Package table allows read and write sorted key/value.
|
Package table allows read and write sorted key/value. |
_workspace/src/github.com/syndtr/goleveldb/leveldb/util
Package util provides utilities used throughout leveldb.
|
Package util provides utilities used throughout leveldb. |
_workspace/src/github.com/twinj/uuid
This package provides RFC4122 UUIDs.
|
This package provides RFC4122 UUIDs. |
_workspace/src/golang.org/x/text/encoding
Package encoding defines an interface for character encodings, such as Shift JIS and Windows 1252, that can convert to and from UTF-8.
|
Package encoding defines an interface for character encodings, such as Shift JIS and Windows 1252, that can convert to and from UTF-8. |
_workspace/src/golang.org/x/text/encoding/charmap
Package charmap provides simple character encodings such as IBM Code Page 437 and Windows 1252.
|
Package charmap provides simple character encodings such as IBM Code Page 437 and Windows 1252. |
_workspace/src/golang.org/x/text/encoding/htmlindex
Package htmlindex maps character set encoding names to Encodings as recommended by the W3C for use in HTML 5.
|
Package htmlindex maps character set encoding names to Encodings as recommended by the W3C for use in HTML 5. |
_workspace/src/golang.org/x/text/encoding/ianaindex
Package ianaindex maps names to Encodings as specified by the IANA registry.
|
Package ianaindex maps names to Encodings as specified by the IANA registry. |
_workspace/src/golang.org/x/text/encoding/internal
Package internal contains code that is shared among encoding implementations.
|
Package internal contains code that is shared among encoding implementations. |
_workspace/src/golang.org/x/text/encoding/internal/identifier
Package identifier defines the contract between implementations of Encoding and Index by defining identifiers that uniquely identify standardized coded character sets (CCS) and character encoding schemes (CES), which we will together refer to as encodings, for which Encoding implementations provide converters to and from UTF-8.
|
Package identifier defines the contract between implementations of Encoding and Index by defining identifiers that uniquely identify standardized coded character sets (CCS) and character encoding schemes (CES), which we will together refer to as encodings, for which Encoding implementations provide converters to and from UTF-8. |
_workspace/src/golang.org/x/text/encoding/japanese
Package japanese provides Japanese encodings such as EUC-JP and Shift JIS.
|
Package japanese provides Japanese encodings such as EUC-JP and Shift JIS. |
_workspace/src/golang.org/x/text/encoding/korean
Package korean provides Korean encodings such as EUC-KR.
|
Package korean provides Korean encodings such as EUC-KR. |
_workspace/src/golang.org/x/text/encoding/simplifiedchinese
Package simplifiedchinese provides Simplified Chinese encodings such as GBK.
|
Package simplifiedchinese provides Simplified Chinese encodings such as GBK. |
_workspace/src/golang.org/x/text/encoding/traditionalchinese
Package traditionalchinese provides Traditional Chinese encodings such as Big5.
|
Package traditionalchinese provides Traditional Chinese encodings such as Big5. |
_workspace/src/golang.org/x/text/encoding/unicode
Package unicode provides Unicode encodings such as UTF-16.
|
Package unicode provides Unicode encodings such as UTF-16. |
_workspace/src/golang.org/x/text/transform
Package transform provides reader and writer wrappers that transform the bytes passing through as well as various transformations.
|
Package transform provides reader and writer wrappers that transform the bytes passing through as well as various transformations. |
store
|
|
mock
Package mock is just for test only.
|
Package mock is just for test only. |