Documentation ¶
Overview ¶
Package driver is a generated protocol buffer package.
It is generated from these files:
cockroach/sql/driver/wire.proto
It has these top-level messages:
RequestHeader ResponseHeader Datum Result Request Response
Index ¶
- Constants
- func RegisterSender(scheme string, f NewSenderFunc)
- type Datum
- func (m *Datum) GetBoolVal() bool
- func (m *Datum) GetBytesVal() []byte
- func (m *Datum) GetFloatVal() float64
- func (m *Datum) GetIntVal() int64
- func (m *Datum) GetStringVal() string
- func (this *Datum) GetValue() interface{}
- func (m *Datum) Marshal() (data []byte, err error)
- func (m *Datum) MarshalTo(data []byte) (n int, err error)
- func (*Datum) ProtoMessage()
- func (m *Datum) Reset()
- func (this *Datum) SetValue(value interface{}) bool
- func (m *Datum) Size() (n int)
- func (d Datum) String() string
- func (m *Datum) Unmarshal(data []byte) error
- type Method
- type NewSenderFunc
- type Request
- func (*Request) CreateReply() *Response
- func (m *Request) GetParams() []Datum
- func (m *Request) GetSql() string
- func (m *Request) Marshal() (data []byte, err error)
- func (m *Request) MarshalTo(data []byte) (n int, err error)
- func (*Request) Method() Method
- func (*Request) ProtoMessage()
- func (m *Request) Reset()
- func (m *Request) Size() (n int)
- func (m *Request) String() string
- func (m *Request) Unmarshal(data []byte) error
- type RequestHeader
- func (m *RequestHeader) GetCmdID() cockroach_proto3.ClientCmdID
- func (m *RequestHeader) GetSession() []byte
- func (m *RequestHeader) GetTxn() []byte
- func (m *RequestHeader) GetUser() string
- func (r *RequestHeader) Header() *RequestHeader
- func (m *RequestHeader) Marshal() (data []byte, err error)
- func (m *RequestHeader) MarshalTo(data []byte) (n int, err error)
- func (*RequestHeader) ProtoMessage()
- func (m *RequestHeader) Reset()
- func (m *RequestHeader) Size() (n int)
- func (m *RequestHeader) String() string
- func (m *RequestHeader) Unmarshal(data []byte) error
- type Response
- func (m *Response) GetResults() []Result
- func (m *Response) Marshal() (data []byte, err error)
- func (m *Response) MarshalTo(data []byte) (n int, err error)
- func (*Response) ProtoMessage()
- func (m *Response) Reset()
- func (m *Response) Size() (n int)
- func (m *Response) String() string
- func (m *Response) Unmarshal(data []byte) error
- type ResponseHeader
- func (m *ResponseHeader) GetError() *cockroach_proto2.Error
- func (m *ResponseHeader) GetSession() []byte
- func (m *ResponseHeader) GetTxn() []byte
- func (r *ResponseHeader) Header() *ResponseHeader
- func (m *ResponseHeader) Marshal() (data []byte, err error)
- func (m *ResponseHeader) MarshalTo(data []byte) (n int, err error)
- func (*ResponseHeader) ProtoMessage()
- func (m *ResponseHeader) Reset()
- func (m *ResponseHeader) Size() (n int)
- func (m *ResponseHeader) String() string
- func (m *ResponseHeader) Unmarshal(data []byte) error
- type Result
- func (m *Result) GetColumns() []string
- func (m *Result) GetRows() []Result_Row
- func (m *Result) Marshal() (data []byte, err error)
- func (m *Result) MarshalTo(data []byte) (n int, err error)
- func (*Result) ProtoMessage()
- func (m *Result) Reset()
- func (m *Result) Size() (n int)
- func (m *Result) String() string
- func (m *Result) Unmarshal(data []byte) error
- type Result_Row
- func (m *Result_Row) GetValues() []Datum
- func (m *Result_Row) Marshal() (data []byte, err error)
- func (m *Result_Row) MarshalTo(data []byte) (n int, err error)
- func (*Result_Row) ProtoMessage()
- func (m *Result_Row) Reset()
- func (m *Result_Row) Size() (n int)
- func (m *Result_Row) String() string
- func (m *Result_Row) Unmarshal(data []byte) error
- type Sender
Constants ¶
const ( // Endpoint is the URL path prefix which accepts incoming // HTTP requests for the SQL API. Endpoint = "/sql/" )
Variables ¶
This section is empty.
Functions ¶
func RegisterSender ¶
func RegisterSender(scheme string, f NewSenderFunc)
RegisterSender registers the specified function to be used for creation of a new sender when the specified scheme is encountered.
Types ¶
type Datum ¶
type Datum struct { BoolVal *bool `protobuf:"varint,1,opt,name=bool_val" json:"bool_val,omitempty"` IntVal *int64 `protobuf:"varint,2,opt,name=int_val" json:"int_val,omitempty"` FloatVal *float64 `protobuf:"fixed64,3,opt,name=float_val" json:"float_val,omitempty"` BytesVal []byte `protobuf:"bytes,4,opt,name=bytes_val" json:"bytes_val,omitempty"` StringVal *string `protobuf:"bytes,5,opt,name=string_val" json:"string_val,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*Datum) GetBoolVal ¶
func (*Datum) GetBytesVal ¶
func (*Datum) GetFloatVal ¶
func (*Datum) GetStringVal ¶
func (*Datum) ProtoMessage ¶
func (*Datum) ProtoMessage()
type NewSenderFunc ¶
NewSenderFunc creates a new sender for the registered scheme.
type Request ¶
type Request struct { // Request header. RequestHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"` // SQL statement(s) to be serially executed by the server. Multiple // statements are passed as a single string separated by semicolons. Sql string `protobuf:"bytes,2,opt,name=sql" json:"sql"` // Parameters referred to in the above SQL statement(s) using "?". Params []Datum `protobuf:"bytes,3,rep,name=params" json:"params"` XXX_unrecognized []byte `json:"-"` }
An SQL request to cockroach. A transaction can consist of multiple requests.
func (*Request) CreateReply ¶
CreateReply creates an empty response for the request.
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
type RequestHeader ¶
type RequestHeader struct { // User is the originating user. User string `protobuf:"bytes,5,opt,name=user" json:"user"` // Session settings that were returned in the last response that // contained them, being reflected back to the server. Session []byte `protobuf:"bytes,1,opt,name=session" json:"session,omitempty"` // The transaction state returned in the previous response being // reflected back. Txn []byte `protobuf:"bytes,2,opt,name=txn" json:"txn,omitempty"` // CmdID is optionally specified for request idempotence // (i.e. replay protection). CmdID cockroach_proto3.ClientCmdID `protobuf:"bytes,3,opt,name=cmd_id" json:"cmd_id"` XXX_unrecognized []byte `json:"-"` }
RequestHeader is supplied with every Request.
func (*RequestHeader) GetCmdID ¶
func (m *RequestHeader) GetCmdID() cockroach_proto3.ClientCmdID
func (*RequestHeader) GetSession ¶
func (m *RequestHeader) GetSession() []byte
func (*RequestHeader) GetTxn ¶
func (m *RequestHeader) GetTxn() []byte
func (*RequestHeader) GetUser ¶
func (m *RequestHeader) GetUser() string
func (*RequestHeader) Header ¶
func (r *RequestHeader) Header() *RequestHeader
Header returns the request header.
func (*RequestHeader) Marshal ¶
func (m *RequestHeader) Marshal() (data []byte, err error)
func (*RequestHeader) ProtoMessage ¶
func (*RequestHeader) ProtoMessage()
func (*RequestHeader) Reset ¶
func (m *RequestHeader) Reset()
func (*RequestHeader) Size ¶
func (m *RequestHeader) Size() (n int)
func (*RequestHeader) String ¶
func (m *RequestHeader) String() string
func (*RequestHeader) Unmarshal ¶
func (m *RequestHeader) Unmarshal(data []byte) error
type Response ¶
type Response struct { ResponseHeader `protobuf:"bytes,1,opt,name=header,embedded=header" json:"header"` // The list of results. There is one result object per SQL statement in the // request. Results []Result `protobuf:"bytes,2,rep,name=results" json:"results"` XXX_unrecognized []byte `json:"-"` }
func (*Response) GetResults ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
type ResponseHeader ¶
type ResponseHeader struct { // Error is non-nil if an error occurred. Error *cockroach_proto2.Error `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"` // Setting that should be reflected back in all subsequent requests. // When not set, future requests should continue to use existing settings. Session []byte `protobuf:"bytes,2,opt,name=session" json:"session,omitempty"` // Transaction message returned in a response; not to be interpreted by // the recipient and reflected in a subsequent request. When not set, // the subsequent request should not contain a transaction object. Txn []byte `protobuf:"bytes,3,opt,name=txn" json:"txn,omitempty"` XXX_unrecognized []byte `json:"-"` }
ResponseHeader is returned with every Response.
func (*ResponseHeader) GetError ¶
func (m *ResponseHeader) GetError() *cockroach_proto2.Error
func (*ResponseHeader) GetSession ¶
func (m *ResponseHeader) GetSession() []byte
func (*ResponseHeader) GetTxn ¶
func (m *ResponseHeader) GetTxn() []byte
func (*ResponseHeader) Header ¶
func (r *ResponseHeader) Header() *ResponseHeader
Header returns the response header.
func (*ResponseHeader) Marshal ¶
func (m *ResponseHeader) Marshal() (data []byte, err error)
func (*ResponseHeader) MarshalTo ¶
func (m *ResponseHeader) MarshalTo(data []byte) (n int, err error)
func (*ResponseHeader) ProtoMessage ¶
func (*ResponseHeader) ProtoMessage()
func (*ResponseHeader) Reset ¶
func (m *ResponseHeader) Reset()
func (*ResponseHeader) Size ¶
func (m *ResponseHeader) Size() (n int)
func (*ResponseHeader) String ¶
func (m *ResponseHeader) String() string
func (*ResponseHeader) Unmarshal ¶
func (m *ResponseHeader) Unmarshal(data []byte) error
type Result ¶
type Result struct { // The names of the columns returned in the result set in the order specified // in the SQL statement. The number of columns will equal the number of // values in each Row. Columns []string `protobuf:"bytes,1,rep,name=columns" json:"columns,omitempty"` // The rows in the result set. Rows []Result_Row `protobuf:"bytes,2,rep,name=rows" json:"rows"` XXX_unrecognized []byte `json:"-"` }
A Result is a collection of rows.
func (*Result) GetColumns ¶
func (*Result) GetRows ¶
func (m *Result) GetRows() []Result_Row
func (*Result) ProtoMessage ¶
func (*Result) ProtoMessage()
type Result_Row ¶
type Result_Row struct { Values []Datum `protobuf:"bytes,1,rep,name=values" json:"values"` XXX_unrecognized []byte `json:"-"` }
A Row is a collection of values representing a row in a result.
func (*Result_Row) GetValues ¶
func (m *Result_Row) GetValues() []Datum
func (*Result_Row) Marshal ¶
func (m *Result_Row) Marshal() (data []byte, err error)
func (*Result_Row) ProtoMessage ¶
func (*Result_Row) ProtoMessage()
func (*Result_Row) Reset ¶
func (m *Result_Row) Reset()
func (*Result_Row) Size ¶
func (m *Result_Row) Size() (n int)
func (*Result_Row) String ¶
func (m *Result_Row) String() string
func (*Result_Row) Unmarshal ¶
func (m *Result_Row) Unmarshal(data []byte) error