Documentation ¶
Index ¶
- func DecodeBindVariablesBson(buf *bytes.Buffer, kind byte) (bindVars map[string]interface{})
- func EncodeBindVariablesBson(buf *bytes2.ChunkedWriter, bindVars map[string]interface{})
- func RegisterAuthenticated(sqlQuery SqlQuery)
- type CacheInvalidate
- type ConnectionInfo
- type DDLInvalidate
- type DmlType
- type Query
- type QueryList
- type QueryResultList
- type Session
- type SessionInfo
- type SessionParams
- type SqlQuery
- type TransactionInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeBindVariablesBson ¶
func EncodeBindVariablesBson ¶
func EncodeBindVariablesBson(buf *bytes2.ChunkedWriter, bindVars map[string]interface{})
func RegisterAuthenticated ¶
func RegisterAuthenticated(sqlQuery SqlQuery)
helper method to register the server (does interface checking)
Types ¶
type CacheInvalidate ¶
type CacheInvalidate struct {
Dmls []DmlType
}
type ConnectionInfo ¶
type ConnectionInfo struct {
ConnectionId int64
}
type DDLInvalidate ¶
type DDLInvalidate struct {
DDL string
}
type Query ¶
type Query struct { Sql string BindVariables map[string]interface{} TransactionId int64 ConnectionId int64 SessionId int64 }
func (*Query) MarshalBson ¶
func (query *Query) MarshalBson(buf *bytes2.ChunkedWriter)
func (*Query) String ¶
String prints a readable version of Query, and also truncates data if it's too long
func (*Query) UnmarshalBson ¶
type QueryResultList ¶
type QueryResultList struct {
List []mproto.QueryResult
}
type Session ¶
func (*Session) MarshalBson ¶
func (session *Session) MarshalBson(buf *bytes2.ChunkedWriter)
func (*Session) UnmarshalBson ¶
type SessionInfo ¶
type SessionInfo struct {
SessionId int64
}
type SessionParams ¶
type SqlQuery ¶
type SqlQuery interface { GetSessionId(sessionParams *SessionParams, sessionInfo *SessionInfo) error // FIXME(sugu) Note the client will support both returning an // int64 or a structure. Using the structure will be rolled // out after the client is rolled out. Begin(context *rpcproto.Context, session *Session, txInfo *TransactionInfo) error Commit(context *rpcproto.Context, session *Session, noOutput *string) error Rollback(context *rpcproto.Context, session *Session, noOutput *string) error CreateReserved(session *Session, connectionInfo *ConnectionInfo) error CloseReserved(session *Session, noOutput *string) error Execute(context *rpcproto.Context, query *Query, reply *mproto.QueryResult) error StreamExecute(context *rpcproto.Context, query *Query, sendReply func(reply interface{}) error) error ExecuteBatch(context *rpcproto.Context, queryList *QueryList, reply *QueryResultList) error }
defines the RPC services the service name to use is 'SqlQuery'
type TransactionInfo ¶
type TransactionInfo struct {
TransactionId int64
}
Click to show internal directories.
Click to hide internal directories.