Documentation ¶
Index ¶
- func DialTablet(context context.Context, endPoint topo.EndPoint, keyspace, shard string, ...) (tabletconn.TabletConn, error)
- type TabletBson
- func (conn *TabletBson) Begin(context context.Context) (transactionID int64, err error)
- func (conn *TabletBson) Close()
- func (conn *TabletBson) Commit(context context.Context, transactionID int64) error
- func (conn *TabletBson) EndPoint() topo.EndPoint
- func (conn *TabletBson) Execute(context context.Context, query string, bindVars map[string]interface{}, ...) (*mproto.QueryResult, error)
- func (conn *TabletBson) ExecuteBatch(context context.Context, queries []tproto.BoundQuery, transactionID int64) (*tproto.QueryResultList, error)
- func (conn *TabletBson) Rollback(context context.Context, transactionID int64) error
- func (conn *TabletBson) SplitQuery(context context.Context, query tproto.BoundQuery, splitCount int) (queries []tproto.QuerySplit, err error)
- func (conn *TabletBson) StreamExecute(context context.Context, query string, bindVars map[string]interface{}, ...) (<-chan *mproto.QueryResult, tabletconn.ErrFunc, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DialTablet ¶
func DialTablet(context context.Context, endPoint topo.EndPoint, keyspace, shard string, timeout time.Duration) (tabletconn.TabletConn, error)
DialTablet creates and initializes TabletBson.
Types ¶
type TabletBson ¶
type TabletBson struct {
// contains filtered or unexported fields
}
TabletBson implements a bson rpcplus implementation for TabletConn
func (*TabletBson) Begin ¶
func (conn *TabletBson) Begin(context context.Context) (transactionID int64, err error)
Begin starts a transaction.
func (*TabletBson) Commit ¶
func (conn *TabletBson) Commit(context context.Context, transactionID int64) error
Commit commits the ongoing transaction.
func (*TabletBson) EndPoint ¶
func (conn *TabletBson) EndPoint() topo.EndPoint
EndPoint returns the rpc end point.
func (*TabletBson) Execute ¶
func (conn *TabletBson) Execute(context context.Context, query string, bindVars map[string]interface{}, transactionID int64) (*mproto.QueryResult, error)
Execute sends the query to VTTablet.
func (*TabletBson) ExecuteBatch ¶
func (conn *TabletBson) ExecuteBatch(context context.Context, queries []tproto.BoundQuery, transactionID int64) (*tproto.QueryResultList, error)
ExecuteBatch sends a batch query to VTTablet.
func (*TabletBson) Rollback ¶
func (conn *TabletBson) Rollback(context context.Context, transactionID int64) error
Rollback rolls back the ongoing transaction.
func (*TabletBson) SplitQuery ¶
func (conn *TabletBson) SplitQuery(context context.Context, query tproto.BoundQuery, splitCount int) (queries []tproto.QuerySplit, err error)
SplitQuery is the stub for SqlQuery.SplitQuery RPC
func (*TabletBson) StreamExecute ¶
func (conn *TabletBson) StreamExecute(context context.Context, query string, bindVars map[string]interface{}, transactionID int64) (<-chan *mproto.QueryResult, tabletconn.ErrFunc, error)
StreamExecute starts a streaming query to VTTablet.
Click to show internal directories.
Click to hide internal directories.