sql

package
v0.0.0-...-d6fed6f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2015 License: Apache-2.0 Imports: 20 Imported by: 0

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

Constants

This section is empty.

Variables

View Source
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 NewServer

func NewServer(ctx *base.Context, db *client.DB) *Server

NewServer allocates and returns a new Server.

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 (m *Session) GetDatabase() string

func (*Session) Marshal

func (m *Session) Marshal() (data []byte, err error)

func (*Session) MarshalTo

func (m *Session) MarshalTo(data []byte) (n int, err error)

func (*Session) ProtoMessage

func (*Session) ProtoMessage()

func (*Session) Reset

func (m *Session) Reset()

func (*Session) Size

func (m *Session) Size() (n int)

func (*Session) String

func (m *Session) String() string

func (*Session) Unmarshal

func (m *Session) Unmarshal(data []byte) error

Directories

Path Synopsis
Package driver is a generated protocol buffer package.
Package driver is a generated protocol buffer package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL