{"modulePath":"github.com/c4pt0r/Cockroach","version":"v0.0.0-20150906015802-4b82dee5d4b7","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package driver\n\nPackage driver is a generated protocol buffer package.\n\nIt is generated from these files:\n\n\tcockroach/sql/driver/wire.proto\n\nIt has these top-level messages:\n\n\tDatum\n\tResult\n\tRequest\n\tResponse\n\n## Constants\n\n```go\nconst (\n\t// Endpoint is the URL path prefix which accepts incoming\n\t// HTTP requests for the SQL API.\n\tEndpoint = \"/sql/\"\n)\n```\n\n```go\nconst (\n\t// StatusTooManyRequests indicates client should retry due to\n\t// server having too many requests.\n\tStatusTooManyRequests = 429\n)\n```\n\n## Variables\n\n```go\nvar (\n\tErrInvalidLengthWire = fmt.Errorf(\"proto: negative length found during unmarshaling\")\n)\n```\n\n## Functions\n\n```go\nfunc RegisterSender(scheme string, f NewSenderFunc)\n```\nRegisterSender registers the specified function to be used for creation of a new sender when the specified scheme is encountered.\n\n## Types\n\n```go\ntype Datum struct {\n\tBoolVal   *bool            `protobuf:\"varint,1,opt,name=bool_val\" json:\"bool_val,omitempty\"`\n\tIntVal    *int64           `protobuf:\"varint,2,opt,name=int_val\" json:\"int_val,omitempty\"`\n\tFloatVal  *float64         `protobuf:\"fixed64,3,opt,name=float_val\" json:\"float_val,omitempty\"`\n\tBytesVal  []byte           `protobuf:\"bytes,4,opt,name=bytes_val\" json:\"bytes_val,omitempty\"`\n\tStringVal *string          `protobuf:\"bytes,5,opt,name=string_val\" json:\"string_val,omitempty\"`\n\tTimeVal   *Datum_Timestamp `protobuf:\"bytes,6,opt,name=time_val\" json:\"time_val,omitempty\"`\n}\n```\n\n```go\nfunc (m *Datum) GetBoolVal() bool\n```\n\n```go\nfunc (m *Datum) GetBytesVal() []byte\n```\n\n```go\nfunc (m *Datum) GetFloatVal() float64\n```\n\n```go\nfunc (m *Datum) GetIntVal() int64\n```\n\n```go\nfunc (m *Datum) GetStringVal() string\n```\n\n```go\nfunc (m *Datum) GetTimeVal() *Datum_Timestamp\n```\n\n```go\nfunc (this *Datum) GetValue() interface{}\n```\n\n```go\nfunc (m *Datum) Marshal() (data []byte, err error)\n```\n\n```go\nfunc (m *Datum) MarshalTo(data []byte) (int, error)\n```\n\n```go\nfunc (*Datum) ProtoMessage()\n```\n\n```go\nfunc (m *Datum) Reset()\n```\n\n```go\nfunc (this *Datum) SetValue(value interface{}) bool\n```\n\n```go\nfunc (m *Datum) Size() (n int)\n```\n\n```go\nfunc (d Datum) String() string\n```\n\n```go\nfunc (m *Datum) Unmarshal(data []byte) error\n```\n\n```go\ntype Datum_Timestamp struct {\n\t// The time in seconds since, January 1, 1970 UTC (Unix time).\n\tSec int64 `protobuf:\"varint,1,opt,name=sec\" json:\"sec\"`\n\t// nsec specifies a non-negative nanosecond offset within sec.\n\t// It must be in the range [0, 999999999].\n\tNsec uint32 `protobuf:\"varint,2,opt,name=nsec\" json:\"nsec\"`\n}\n```\nTimestamp represents an absolute timestamp devoid of time-zone.\n\n```go\nfunc (m *Datum_Timestamp) GetNsec() uint32\n```\n\n```go\nfunc (m *Datum_Timestamp) GetSec() int64\n```\n\n```go\nfunc (m *Datum_Timestamp) Marshal() (data []byte, err error)\n```\n\n```go\nfunc (m *Datum_Timestamp) MarshalTo(data []byte) (int, error)\n```\n\n```go\nfunc (*Datum_Timestamp) ProtoMessage()\n```\n\n```go\nfunc (m *Datum_Timestamp) Reset()\n```\n\n```go\nfunc (m *Datum_Timestamp) Size() (n int)\n```\n\n```go\nfunc (m *Datum_Timestamp) String() string\n```\n\n```go\nfunc (m *Datum_Timestamp) Unmarshal(data []byte) error\n```\n\n```go\ntype Method int\n```\nMethod is the enumerated type for methods.\n\n```go\nconst (\n\t// Execute runs all the sql statements in a SQLRequest and\n\t// returns a SQLResponse.\n\tExecute Method = iota\n)\n```\n\n```go\nfunc (i Method) String() string\n```\n\n```go\ntype NewSenderFunc func(u *url.URL, ctx *base.Context, retryOpts retry.Options) (Sender, error)\n```\nNewSenderFunc creates a new sender for the registered scheme.\n\n```go\ntype Request struct {\n\t// User is the originating user.\n\tUser string `protobuf:\"bytes,1,opt,name=user\" json:\"user\"`\n\t// Session settings that were returned in the last response that\n\t// contained them, being reflected back to the server.\n\tSession []byte `protobuf:\"bytes,2,opt,name=session\" json:\"session,omitempty\"`\n\t// SQL statement(s) to be serially executed by the server. Multiple\n\t// statements are passed as a single string separated by semicolons.\n\tSql string `protobuf:\"bytes,3,opt,name=sql\" json:\"sql\"`\n\t// Parameters referred to in the above SQL statement(s) using \"?\".\n\tParams []Datum `protobuf:\"bytes,4,rep,name=params\" json:\"params\"`\n}\n```\nAn SQL request to cockroach. A transaction can consist of multiple requests.\n\n```go\nfunc (Request) CreateReply() Response\n```\nCreateReply creates an empty response for the request.\n\n```go\nfunc (m *Request) GetParams() []Datum\n```\n\n```go\nfunc (m *Request) GetSession() []byte\n```\n\n```go\nfunc (m *Request) GetSql() string\n```\n\n```go\nfunc (m *Request) GetUser() string\n```\n\n```go\nfunc (m *Request) Marshal() (data []byte, err error)\n```\n\n```go\nfunc (m *Request) MarshalTo(data []byte) (int, error)\n```\n\n```go\nfunc (Request) Method() Method\n```\nMethod returns the method.\n\n```go\nfunc (*Request) ProtoMessage()\n```\n\n```go\nfunc (m *Request) Reset()\n```\n\n```go\nfunc (m *Request) Size() (n int)\n```\n\n```go\nfunc (m *Request) String() string\n```\n\n```go\nfunc (m *Request) Unmarshal(data []byte) error\n```\n\n```go\ntype Response struct {\n\t// Setting that should be reflected back in all subsequent requests.\n\t// When not set, future requests should continue to use existing settings.\n\tSession []byte `protobuf:\"bytes,1,opt,name=session\" json:\"session,omitempty\"`\n\t// The list of results. There is one result object per SQL statement in the\n\t// request.\n\tResults []Result `protobuf:\"bytes,2,rep,name=results\" json:\"results\"`\n}\n```\n\n```go\nfunc (m *Response) GetResults() []Result\n```\n\n```go\nfunc (m *Response) GetSession() []byte\n```\n\n```go\nfunc (m *Response) Marshal() (data []byte, err error)\n```\n\n```go\nfunc (m *Response) MarshalTo(data []byte) (int, error)\n```\n\n```go\nfunc (*Response) ProtoMessage()\n```\n\n```go\nfunc (m *Response) Reset()\n```\n\n```go\nfunc (m *Response) Size() (n int)\n```\n\n```go\nfunc (m *Response) String() string\n```\n\n```go\nfunc (m *Response) Unmarshal(data []byte) error\n```\n\n```go\ntype Result struct {\n\t// Error is non-nil if an error occurred while executing the statement.\n\tError *cockroach_proto2.Error `protobuf:\"bytes,1,opt,name=error\" json:\"error,omitempty\"`\n\t// The names of the columns returned in the result set in the order specified\n\t// in the SQL statement. The number of columns will equal the number of\n\t// values in each Row.\n\tColumns []string `protobuf:\"bytes,2,rep,name=columns\" json:\"columns,omitempty\"`\n\t// The rows in the result set.\n\tRows []Result_Row `protobuf:\"bytes,3,rep,name=rows\" json:\"rows\"`\n}\n```\nA Result is a collection of rows.\n\n```go\nfunc (m *Result) GetColumns() []string\n```\n\n```go\nfunc (m *Result) GetError() *cockroach_proto2.Error\n```\n\n```go\nfunc (m *Result) GetRows() []Result_Row\n```\n\n```go\nfunc (m *Result) Marshal() (data []byte, err error)\n```\n\n```go\nfunc (m *Result) MarshalTo(data []byte) (int, error)\n```\n\n```go\nfunc (*Result) ProtoMessage()\n```\n\n```go\nfunc (m *Result) Reset()\n```\n\n```go\nfunc (m *Result) Size() (n int)\n```\n\n```go\nfunc (m *Result) String() string\n```\n\n```go\nfunc (m *Result) Unmarshal(data []byte) error\n```\n\n```go\ntype Result_Row struct {\n\tValues []Datum `protobuf:\"bytes,1,rep,name=values\" json:\"values\"`\n}\n```\nA Row is a collection of values representing a row in a result.\n\n```go\nfunc (m *Result_Row) GetValues() []Datum\n```\n\n```go\nfunc (m *Result_Row) Marshal() (data []byte, err error)\n```\n\n```go\nfunc (m *Result_Row) MarshalTo(data []byte) (int, error)\n```\n\n```go\nfunc (*Result_Row) ProtoMessage()\n```\n\n```go\nfunc (m *Result_Row) Reset()\n```\n\n```go\nfunc (m *Result_Row) Size() (n int)\n```\n\n```go\nfunc (m *Result_Row) String() string\n```\n\n```go\nfunc (m *Result_Row) Unmarshal(data []byte) error\n```\n\n```go\ntype Sender interface {\n\t// Send dispatches a `Request` and returns the resulting `Response` with an\n\t// optional transmission error.\n\tSend(Request) (Response, error)\n}\n```\nSender is an interface for sending a request to a SQL database backend.\n\n","path":"github.com/c4pt0r/Cockroach/sql/driver","name":"driver","synopsis":"Package driver is a generated protocol buffer package.","isRedistributable":true}
