Documentation ¶
Overview ¶
Package sql is a generated protocol buffer package.
It is generated from these files:
cockroach/sql/server.proto
It has these top-level messages:
Session
Index ¶
- Variables
- type Server
- type Session
- func (m *Session) GetDatabase() string
- func (m *Session) Marshal() (data []byte, err error)
- func (m *Session) MarshalTo(data []byte) (n int, err error)
- func (*Session) ProtoMessage()
- func (m *Session) Reset()
- func (m *Session) Size() (n int)
- func (m *Session) String() string
- func (m *Session) Unmarshal(data []byte) error
Constants ¶
This section is empty.
Variables ¶
var (
ErrInvalidLengthServer = fmt.Errorf("proto: negative length found during unmarshaling")
)
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
A Server provides an HTTP server endpoint serving the SQL API. It accepts either JSON or serialized protobuf content types.
func (*Server) ServeHTTP ¶
func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP serves the SQL API by treating the request URL path as the method, the request body as the arguments, and sets the response body as the method reply. The request body is unmarshalled into arguments based on the Content-Type request header. Protobuf and JSON-encoded requests are supported. The response body is encoded according to the request's Accept header, or if not present, in the same format as the request's incoming Content-Type header.
type Session ¶
type Session struct { Database string `protobuf:"bytes,1,opt,name=database" json:"database"` XXX_unrecognized []byte `json:"-"` }
func (*Session) GetDatabase ¶
func (*Session) ProtoMessage ¶
func (*Session) ProtoMessage()