Documentation ¶
Index ¶
- Constants
- 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 ¶
This section is empty.
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/djimenez/iconv-go
Wraps the iconv API present on most systems, which allows for conversion of bytes from one encoding to another.
|
Wraps the iconv API present on most systems, which allows for conversion of bytes from one encoding to another. |
_workspace/src/github.com/docopt/docopt-go
Package docopt parses command-line arguments based on a help message.
|
Package docopt parses command-line arguments based on a help message. |
_workspace/src/github.com/google/go-snappy/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] The juju/errors provides an easy way to annotate errors without losing the orginal error context.
|
[godoc-link-here] The juju/errors provides an easy way to annotate errors without losing the orginal error context. |
_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/ngaut/logging
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. |
store
|
|
mock
Package mock is just for test only.
|
Package mock is just for test only. |