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:
Datum Result Request Response
Index ¶
- Constants
- Variables
- 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 (m *Datum) GetTimeVal() *Datum_Timestamp
- func (this *Datum) GetValue() interface{}
- func (m *Datum) Marshal() (data []byte, err error)
- func (m *Datum) MarshalTo(data []byte) (int, 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 Datum_Timestamp
- func (m *Datum_Timestamp) GetNsec() uint32
- func (m *Datum_Timestamp) GetSec() int64
- func (m *Datum_Timestamp) Marshal() (data []byte, err error)
- func (m *Datum_Timestamp) MarshalTo(data []byte) (int, error)
- func (*Datum_Timestamp) ProtoMessage()
- func (m *Datum_Timestamp) Reset()
- func (m *Datum_Timestamp) Size() (n int)
- func (m *Datum_Timestamp) String() string
- func (m *Datum_Timestamp) Unmarshal(data []byte) error
- type Method
- type NewSenderFunc
- type Request
- func (Request) CreateReply() Response
- func (m *Request) GetParams() []Datum
- func (m *Request) GetSession() []byte
- func (m *Request) GetSql() string
- func (m *Request) GetUser() string
- func (m *Request) Marshal() (data []byte, err error)
- func (m *Request) MarshalTo(data []byte) (int, 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 Response
- func (m *Response) GetResults() []Result
- func (m *Response) GetSession() []byte
- func (m *Response) Marshal() (data []byte, err error)
- func (m *Response) MarshalTo(data []byte) (int, 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 Result
- func (m *Result) GetColumns() []string
- func (m *Result) GetError() *cockroach_proto2.Error
- func (m *Result) GetRows() []Result_Row
- func (m *Result) Marshal() (data []byte, err error)
- func (m *Result) MarshalTo(data []byte) (int, 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) (int, 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 ¶
View Source
const ( // Endpoint is the URL path prefix which accepts incoming // HTTP requests for the SQL API. Endpoint = "/sql/" )
View Source
const ( // StatusTooManyRequests indicates client should retry due to // server having too many requests. StatusTooManyRequests = 429 )
Variables ¶
View Source
var (
ErrInvalidLengthWire = fmt.Errorf("proto: negative length found during unmarshaling")
)
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"` TimeVal *Datum_Timestamp `protobuf:"bytes,6,opt,name=time_val" json:"time_val,omitempty"` }
func (*Datum) GetBoolVal ¶
func (*Datum) GetBytesVal ¶
func (*Datum) GetFloatVal ¶
func (*Datum) GetStringVal ¶
func (*Datum) GetTimeVal ¶
func (m *Datum) GetTimeVal() *Datum_Timestamp
func (*Datum) ProtoMessage ¶
func (*Datum) ProtoMessage()
type Datum_Timestamp ¶
type Datum_Timestamp struct { // The time in seconds since, January 1, 1970 UTC (Unix time). Sec int64 `protobuf:"varint,1,opt,name=sec" json:"sec"` // nsec specifies a non-negative nanosecond offset within sec. // It must be in the range [0, 999999999]. Nsec uint32 `protobuf:"varint,2,opt,name=nsec" json:"nsec"` }
Timestamp represents an absolute timestamp devoid of time-zone.
func (*Datum_Timestamp) GetNsec ¶
func (m *Datum_Timestamp) GetNsec() uint32
func (*Datum_Timestamp) GetSec ¶
func (m *Datum_Timestamp) GetSec() int64
func (*Datum_Timestamp) Marshal ¶
func (m *Datum_Timestamp) Marshal() (data []byte, err error)
func (*Datum_Timestamp) ProtoMessage ¶
func (*Datum_Timestamp) ProtoMessage()
func (*Datum_Timestamp) Reset ¶
func (m *Datum_Timestamp) Reset()
func (*Datum_Timestamp) Size ¶
func (m *Datum_Timestamp) Size() (n int)
func (*Datum_Timestamp) String ¶
func (m *Datum_Timestamp) String() string
func (*Datum_Timestamp) Unmarshal ¶
func (m *Datum_Timestamp) Unmarshal(data []byte) error
type NewSenderFunc ¶
NewSenderFunc creates a new sender for the registered scheme.
type Request ¶
type Request struct { // User is the originating user. User string `protobuf:"bytes,1,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,2,opt,name=session" json:"session,omitempty"` // 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,3,opt,name=sql" json:"sql"` // Parameters referred to in the above SQL statement(s) using "?". Params []Datum `protobuf:"bytes,4,rep,name=params" json:"params"` }
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) GetSession ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
type Response ¶
type Response struct { // 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,1,opt,name=session" json:"session,omitempty"` // 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"` }
func (*Response) GetResults ¶
func (*Response) GetSession ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
type Result ¶
type Result struct { // Error is non-nil if an error occurred while executing the statement. Error *cockroach_proto2.Error `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"` // 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,2,rep,name=columns" json:"columns,omitempty"` // The rows in the result set. Rows []Result_Row `protobuf:"bytes,3,rep,name=rows" json:"rows"` }
A Result is a collection of rows.
func (*Result) GetColumns ¶
func (*Result) GetError ¶
func (m *Result) GetError() *cockroach_proto2.Error
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"`
}
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
Click to show internal directories.
Click to hide internal directories.