{"modulePath":"github.com/objectundefined/cockroach","version":"v0.0.0-20160624191317-5695764788c5","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package distsql\n\nPackage distsql is a generated protocol buffer package.\n\nIt is generated from these files:\n\n\tcockroach/sql/distsql/api.proto\n\tcockroach/sql/distsql/data.proto\n\tcockroach/sql/distsql/processors.proto\n\nIt has these top-level messages:\n\n\tSetupFlowsRequest\n\tSimpleResponse\n\tExpression\n\tOrdering\n\tMailboxSpec\n\tStreamEndpointSpec\n\tInputSyncSpec\n\tOutputRouterSpec\n\tDatumInfo\n\tStreamHeader\n\tStreamData\n\tStreamTrailer\n\tStreamMessage\n\tTableReaderSpan\n\tTableReaderSpec\n\tJoinReaderSpec\n\tProcessorCoreUnion\n\tProcessorSpec\n\tFlowSpec\n\n## Variables\n\n```go\nvar (\n\tErrInvalidLengthApi = fmt.Errorf(\"proto: negative length found during unmarshaling\")\n\tErrIntOverflowApi   = fmt.Errorf(\"proto: integer overflow\")\n)\n```\n\n```go\nvar (\n\tErrInvalidLengthData = fmt.Errorf(\"proto: negative length found during unmarshaling\")\n\tErrIntOverflowData   = fmt.Errorf(\"proto: integer overflow\")\n)\n```\n\n```go\nvar (\n\tErrInvalidLengthProcessors = fmt.Errorf(\"proto: negative length found during unmarshaling\")\n\tErrIntOverflowProcessors   = fmt.Errorf(\"proto: integer overflow\")\n)\n```\n\n```go\nvar InputSyncSpec_Type_name = map[int32]string{\n\t0: \"UNORDERED\",\n\t1: \"ORDERED\",\n}\n```\n\n```go\nvar InputSyncSpec_Type_value = map[string]int32{\n\t\"UNORDERED\": 0,\n\t\"ORDERED\":   1,\n}\n```\n\n```go\nvar Ordering_Column_Direction_name = map[int32]string{\n\t0: \"ASC\",\n\t1: \"DESC\",\n}\n```\n\n```go\nvar Ordering_Column_Direction_value = map[string]int32{\n\t\"ASC\":  0,\n\t\"DESC\": 1,\n}\n```\n\n```go\nvar OutputRouterSpec_Type_name = map[int32]string{\n\t0: \"MIRROR\",\n\t1: \"BY_HASH\",\n\t2: \"BY_RANGE\",\n}\n```\n\n```go\nvar OutputRouterSpec_Type_value = map[string]int32{\n\t\"MIRROR\":   0,\n\t\"BY_HASH\":  1,\n\t\"BY_RANGE\": 2,\n}\n```\n\n## Functions\n\n```go\nfunc RegisterDistSQLServer(s *grpc.Server, srv DistSQLServer)\n```\n\n## Types\n\n```go\ntype DatumInfo struct {\n\tEncoding cockroach_sql_sqlbase2.DatumEncoding   `protobuf:\"varint,1,opt,name=encoding,enum=cockroach.sql.sqlbase.DatumEncoding\" json:\"encoding\"`\n\tType     cockroach_sql_sqlbase1.ColumnType_Kind `protobuf:\"varint,2,opt,name=type,enum=cockroach.sql.sqlbase.ColumnType_Kind\" json:\"type\"`\n}\n```\n\n```go\nfunc (*DatumInfo) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *DatumInfo) Marshal() (data []byte, err error)\n```\n\n```go\nfunc (m *DatumInfo) MarshalTo(data []byte) (int, error)\n```\n\n```go\nfunc (*DatumInfo) ProtoMessage()\n```\n\n```go\nfunc (m *DatumInfo) Reset()\n```\n\n```go\nfunc (m *DatumInfo) Size() (n int)\n```\n\n```go\nfunc (m *DatumInfo) String() string\n```\n\n```go\nfunc (m *DatumInfo) Unmarshal(data []byte) error\n```\n\n```go\ntype DistSQLClient interface {\n\t// SetupFlows instantiates a set of flows (subgraphs of a distributed SQL\n\t// computation) on the receiving node.\n\tSetupFlows(ctx context.Context, in *SetupFlowsRequest, opts ...grpc.CallOption) (*SimpleResponse, error)\n\t// RunSimpleFlow instantiates a flow and streams back results of that flow.\n\t// The request must contain one flow, and that flow must have a single mailbox\n\t// of the special simple response type.\n\tRunSimpleFlow(ctx context.Context, in *SetupFlowsRequest, opts ...grpc.CallOption) (DistSQL_RunSimpleFlowClient, error)\n}\n```\n\n```go\nfunc NewDistSQLClient(cc *grpc.ClientConn) DistSQLClient\n```\n\n```go\ntype DistSQLServer interface {\n\t// SetupFlows instantiates a set of flows (subgraphs of a distributed SQL\n\t// computation) on the receiving node.\n\tSetupFlows(context.Context, *SetupFlowsRequest) (*SimpleResponse, error)\n\t// RunSimpleFlow instantiates a flow and streams back results of that flow.\n\t// The request must contain one flow, and that flow must have a single mailbox\n\t// of the special simple response type.\n\tRunSimpleFlow(*SetupFlowsRequest, DistSQL_RunSimpleFlowServer) error\n}\n```\n\n```go\ntype DistSQL_RunSimpleFlowClient interface {\n\tRecv() (*StreamMessage, error)\n\tgrpc.ClientStream\n}\n```\n\n```go\ntype DistSQL_RunSimpleFlowServer interface {\n\tSend(*StreamMessage) error\n\tgrpc.ServerStream\n}\n```\n\n```go\ntype Expression struct {\n\t// TODO(radu): TBD how this will be used\n\tVersion string `protobuf:\"bytes,1,opt,name=version\" json:\"version\"`\n\t// SQL expressions are passed as a string, with Placeholders ($1, $2 ..) used for\n\t// \"input\" variables.\n\tExpr string `protobuf:\"bytes,2,opt,name=expr\" json:\"expr\"`\n}\n```\n\n```go\nfunc (*Expression) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *Expression) Marshal() (data []byte, err error)\n```\n\n```go\nfunc (m *Expression) MarshalTo(data []byte) (int, error)\n```\n\n```go\nfunc (*Expression) ProtoMessage()\n```\n\n```go\nfunc (m *Expression) Reset()\n```\n\n```go\nfunc (m *Expression) Size() (n int)\n```\n\n```go\nfunc (m *Expression) String() string\n```\n\n```go\nfunc (m *Expression) Unmarshal(data []byte) error\n```\n\n```go\ntype Flow struct {\n\t// contains filtered or unexported fields\n}\n```\nFlow represents a flow which consists of processors and streams.\n\n```go\nfunc (f *Flow) RunSync()\n```\nRunSync runs the processors in the flow in order (serially), in the same context (no goroutines are spawned).\n\n```go\nfunc (f *Flow) Start()\n```\nStart starts the flow (each processor runs in their own goroutine).\n\n```go\nfunc (f *Flow) Wait()\n```\nWait waits for all the goroutines for this flow to exit.\n\n```go\ntype FlowSpec struct {\n\tProcessors []ProcessorSpec `protobuf:\"bytes,1,rep,name=processors\" json:\"processors\"`\n}\n```\nFlowSpec describes a \"flow\" which is a subgraph of a distributed SQL computation consisting of processors and streams.\n\n```go\nfunc (*FlowSpec) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *FlowSpec) Marshal() (data []byte, err error)\n```\n\n```go\nfunc (m *FlowSpec) MarshalTo(data []byte) (int, error)\n```\n\n```go\nfunc (*FlowSpec) ProtoMessage()\n```\n\n```go\nfunc (m *FlowSpec) Reset()\n```\n\n```go\nfunc (m *FlowSpec) Size() (n int)\n```\n\n```go\nfunc (m *FlowSpec) String() string\n```\n\n```go\nfunc (m *FlowSpec) Unmarshal(data []byte) error\n```\n\n```go\ntype InputSyncSpec struct {\n\tOrdering Ordering             `protobuf:\"bytes,1,opt,name=ordering\" json:\"ordering\"`\n\tStreams  []StreamEndpointSpec `protobuf:\"bytes,2,rep,name=streams\" json:\"streams\"`\n}\n```\nInputSyncSpec is the specification for an input synchronizer; it decides how to interleave rows from multiple input streams.\n\n```go\nfunc (*InputSyncSpec) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *InputSyncSpec) Marshal() (data []byte, err error)\n```\n\n```go\nfunc (m *InputSyncSpec) MarshalTo(data []byte) (int, error)\n```\n\n```go\nfunc (*InputSyncSpec) ProtoMessage()\n```\n\n```go\nfunc (m *InputSyncSpec) Reset()\n```\n\n```go\nfunc (m *InputSyncSpec) Size() (n int)\n```\n\n```go\nfunc (m *InputSyncSpec) String() string\n```\n\n```go\nfunc (m *InputSyncSpec) Unmarshal(data []byte) error\n```\n\n```go\ntype InputSyncSpec_Type int32\n```\n\n```go\nconst (\n\t// Rows from the input streams are interleaved arbitrarily.\n\tInputSyncSpec_UNORDERED InputSyncSpec_Type = 0\n\t// The input streams are guaranteed to be ordered according to the column\n\t// ordering field; rows from the streams are interleaved to preserve that\n\t// ordering.\n\tInputSyncSpec_ORDERED InputSyncSpec_Type = 1\n)\n```\n\n```go\nfunc (x InputSyncSpec_Type) Enum() *InputSyncSpec_Type\n```\n\n```go\nfunc (InputSyncSpec_Type) EnumDescriptor() ([]byte, []int)\n```\n\n```go\nfunc (x InputSyncSpec_Type) String() string\n```\n\n```go\nfunc (x *InputSyncSpec_Type) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype JoinReaderSpec struct {\n\tTable cockroach_sql_sqlbase1.TableDescriptor `protobuf:\"bytes,1,opt,name=table\" json:\"table\"`\n\t// If 0, we use the primary index; each row in the input stream has a value\n\t// for each primary key.\n\t// TODO(radu): figure out the correct semantics when joining with an index.\n\tIndexIdx uint32 `protobuf:\"varint,2,opt,name=index_idx,json=indexIdx\" json:\"index_idx\"`\n\t// The filter expression references the columns in the table (table.columns)\n\t// via $0, $1, etc. If a secondary index is used, the columns that are not\n\t// available as part of the index cannot be referenced.\n\tFilter Expression `protobuf:\"bytes,3,opt,name=filter\" json:\"filter\"`\n\t// The table reader will only produce values for these columns, referenced by\n\t// their indices in table.columns.\n\tOutputColumns []uint32 `protobuf:\"varint,4,rep,packed,name=output_columns,json=outputColumns\" json:\"output_columns,omitempty\"`\n}\n```\nJoinReaderSpec is the specification for a \"join reader\". A join reader performs KV operations to retrieve specific rows that correspond to the values in the input stream (join by lookup).\n\n```go\nfunc (*JoinReaderSpec) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *JoinReaderSpec) Marshal() (data []byte, err error)\n```\n\n```go\nfunc (m *JoinReaderSpec) MarshalTo(data []byte) (int, error)\n```\n\n```go\nfunc (*JoinReaderSpec) ProtoMessage()\n```\n\n```go\nfunc (m *JoinReaderSpec) Reset()\n```\n\n```go\nfunc (m *JoinReaderSpec) Size() (n int)\n```\n\n```go\nfunc (m *JoinReaderSpec) String() string\n```\n\n```go\nfunc (m *JoinReaderSpec) Unmarshal(data []byte) error\n```\n\n```go\ntype MailboxSpec struct {\n\t// If set, we are in a special \"simple flow\" mode. In this mode, we return\n\t// results directly as part of the RPC call that set up the flow. This saves\n\t// overhead (extra RPCs) compared to the normal mode where the RPC just sets\n\t// up the flow. In this mode there are no remote endpoints so this must be the\n\t// only mailbox in that flow.\n\tSimpleResponse bool `protobuf:\"varint,1,opt,name=simple_response,json=simpleResponse\" json:\"simple_response\"`\n}\n```\n\n```go\nfunc (*MailboxSpec) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *MailboxSpec) Marshal() (data []byte, err error)\n```\n\n```go\nfunc (m *MailboxSpec) MarshalTo(data []byte) (int, error)\n```\n\n```go\nfunc (*MailboxSpec) ProtoMessage()\n```\n\n```go\nfunc (m *MailboxSpec) Reset()\n```\n\n```go\nfunc (m *MailboxSpec) Size() (n int)\n```\n\n```go\nfunc (m *MailboxSpec) String() string\n```\n\n```go\nfunc (m *MailboxSpec) Unmarshal(data []byte) error\n```\n\n```go\ntype Ordering struct {\n\tColumns []Ordering_Column `protobuf:\"bytes,1,rep,name=columns\" json:\"columns\"`\n}\n```\nOrdering defines an order - specifically a list of column indices and directions. See sqlbase.ColumnOrdering.\n\n```go\nfunc (*Ordering) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *Ordering) Marshal() (data []byte, err error)\n```\n\n```go\nfunc (m *Ordering) MarshalTo(data []byte) (int, error)\n```\n\n```go\nfunc (*Ordering) ProtoMessage()\n```\n\n```go\nfunc (m *Ordering) Reset()\n```\n\n```go\nfunc (m *Ordering) Size() (n int)\n```\n\n```go\nfunc (m *Ordering) String() string\n```\n\n```go\nfunc (m *Ordering) Unmarshal(data []byte) error\n```\n\n```go\ntype Ordering_Column struct {\n\tColIdx    uint32                    `protobuf:\"varint,1,opt,name=col_idx,json=colIdx\" json:\"col_idx\"`\n\tDirection Ordering_Column_Direction `protobuf:\"varint,2,opt,name=direction,enum=cockroach.sql.distsql.Ordering_Column_Direction\" json:\"direction\"`\n}\n```\n\n```go\nfunc (*Ordering_Column) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *Ordering_Column) Marshal() (data []byte, err error)\n```\n\n```go\nfunc (m *Ordering_Column) MarshalTo(data []byte) (int, error)\n```\n\n```go\nfunc (*Ordering_Column) ProtoMessage()\n```\n\n```go\nfunc (m *Ordering_Column) Reset()\n```\n\n```go\nfunc (m *Ordering_Column) Size() (n int)\n```\n\n```go\nfunc (m *Ordering_Column) String() string\n```\n\n```go\nfunc (m *Ordering_Column) Unmarshal(data []byte) error\n```\n\n```go\ntype Ordering_Column_Direction int32\n```\nThe direction of the desired ordering for a column.\n\n```go\nconst (\n\tOrdering_Column_ASC  Ordering_Column_Direction = 0\n\tOrdering_Column_DESC Ordering_Column_Direction = 1\n)\n```\n\n```go\nfunc (x Ordering_Column_Direction) Enum() *Ordering_Column_Direction\n```\n\n```go\nfunc (Ordering_Column_Direction) EnumDescriptor() ([]byte, []int)\n```\n\n```go\nfunc (x Ordering_Column_Direction) String() string\n```\n\n```go\nfunc (x *Ordering_Column_Direction) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype OutputRouterSpec struct {\n\tType    OutputRouterSpec_Type `protobuf:\"varint,1,opt,name=type,enum=cockroach.sql.distsql.OutputRouterSpec_Type\" json:\"type\"`\n\tStreams []StreamEndpointSpec  `protobuf:\"bytes,2,rep,name=streams\" json:\"streams\"`\n}\n```\nOutputRouterSpec is the specification for the output router of a processor; it decides how to send results to multiple output streams.\n\n```go\nfunc (*OutputRouterSpec) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *OutputRouterSpec) Marshal() (data []byte, err error)\n```\n\n```go\nfunc (m *OutputRouterSpec) MarshalTo(data []byte) (int, error)\n```\n\n```go\nfunc (*OutputRouterSpec) ProtoMessage()\n```\n\n```go\nfunc (m *OutputRouterSpec) Reset()\n```\n\n```go\nfunc (m *OutputRouterSpec) Size() (n int)\n```\n\n```go\nfunc (m *OutputRouterSpec) String() string\n```\n\n```go\nfunc (m *OutputRouterSpec) Unmarshal(data []byte) error\n```\n\n```go\ntype OutputRouterSpec_Type int32\n```\n\n```go\nconst (\n\t// Each row is sent to all output streams (also used if there is a\n\t// single output stream).\n\tOutputRouterSpec_MIRROR OutputRouterSpec_Type = 0\n\t// Each row is sent to one stream, chosen by hashing certain columns of\n\t// the row. TODO(radu): an extra optional structure below for the hashing\n\t// details.\n\tOutputRouterSpec_BY_HASH OutputRouterSpec_Type = 1\n\t// Each row is sent to one stream, chosen according to preset boundaries\n\t// for the values of certain columns of the row. TODO(radu): an extra\n\t// optional structure below for the range details.\n\tOutputRouterSpec_BY_RANGE OutputRouterSpec_Type = 2\n)\n```\n\n```go\nfunc (x OutputRouterSpec_Type) Enum() *OutputRouterSpec_Type\n```\n\n```go\nfunc (OutputRouterSpec_Type) EnumDescriptor() ([]byte, []int)\n```\n\n```go\nfunc (x OutputRouterSpec_Type) String() string\n```\n\n```go\nfunc (x *OutputRouterSpec_Type) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ProcessorCoreUnion struct {\n\tTableReader *TableReaderSpec `protobuf:\"bytes,1,opt,name=tableReader\" json:\"tableReader,omitempty\"`\n}\n```\n\n```go\nfunc (*ProcessorCoreUnion) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (this *ProcessorCoreUnion) GetValue() interface{}\n```\n\n```go\nfunc (m *ProcessorCoreUnion) Marshal() (data []byte, err error)\n```\n\n```go\nfunc (m *ProcessorCoreUnion) MarshalTo(data []byte) (int, error)\n```\n\n```go\nfunc (*ProcessorCoreUnion) ProtoMessage()\n```\n\n```go\nfunc (m *ProcessorCoreUnion) Reset()\n```\n\n```go\nfunc (this *ProcessorCoreUnion) SetValue(value interface{}) bool\n```\n\n```go\nfunc (m *ProcessorCoreUnion) Size() (n int)\n```\n\n```go\nfunc (m *ProcessorCoreUnion) String() string\n```\n\n```go\nfunc (m *ProcessorCoreUnion) Unmarshal(data []byte) error\n```\n\n```go\ntype ProcessorSpec struct {\n\t// In most cases, there is one input.\n\tInput []InputSyncSpec    `protobuf:\"bytes,1,rep,name=input\" json:\"input\"`\n\tCore  ProcessorCoreUnion `protobuf:\"bytes,2,opt,name=core\" json:\"core\"`\n\t// In most cases, there is one output.\n\tOutput []OutputRouterSpec `protobuf:\"bytes,3,rep,name=output\" json:\"output\"`\n}\n```\n\n```go\nfunc (*ProcessorSpec) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *ProcessorSpec) Marshal() (data []byte, err error)\n```\n\n```go\nfunc (m *ProcessorSpec) MarshalTo(data []byte) (int, error)\n```\n\n```go\nfunc (*ProcessorSpec) ProtoMessage()\n```\n\n```go\nfunc (m *ProcessorSpec) Reset()\n```\n\n```go\nfunc (m *ProcessorSpec) Size() (n int)\n```\n\n```go\nfunc (m *ProcessorSpec) String() string\n```\n\n```go\nfunc (m *ProcessorSpec) Unmarshal(data []byte) error\n```\n\n```go\ntype RowBuffer struct {\n\t// contains filtered or unexported fields\n}\n```\nRowBuffer is an implementation of RowReceiver that buffers (accumulates) results in memory, as well as an implementation of rowSender that returns rows from a row buffer.\n\n```go\nfunc (rb *RowBuffer) Close(err error)\n```\nClose is part of the RowReceiver interface.\n\n```go\nfunc (rb *RowBuffer) NextRow() (sqlbase.EncDatumRow, error)\n```\nNextRow is part of the RowSource interface.\n\n```go\nfunc (rb *RowBuffer) PushRow(row sqlbase.EncDatumRow) bool\n```\nPushRow is part of the RowReceiver interface.\n\n```go\ntype RowChannel struct {\n\t// The channel on which rows are delivered.\n\tC \u003c-chan StreamMsg\n\t// contains filtered or unexported fields\n}\n```\nRowChannel is a thin layer over a StreamMsg channel, which can be used to transfer rows between goroutines.\n\n```go\nfunc (rc *RowChannel) Close(err error)\n```\nClose is part of the RowReceiver interface.\n\n```go\nfunc (rc *RowChannel) Init()\n```\nInit initializes the RowChannel with the default buffer size.\n\n```go\nfunc (rc *RowChannel) InitWithBufSize(chanBufSize int)\n```\nInitWithBufSize initializes the RowChannel with a given buffer size.\n\n```go\nfunc (rc *RowChannel) NextRow() (sqlbase.EncDatumRow, error)\n```\nNextRow is part of the RowSource interface.\n\n```go\nfunc (rc *RowChannel) NoMoreRows()\n```\nNoMoreRows causes future PushRow calls to return false. The caller should still drain the channel to make sure the sender is not blocked.\n\n```go\nfunc (rc *RowChannel) PushRow(row sqlbase.EncDatumRow) bool\n```\nPushRow is part of the RowReceiver interface.\n\n```go\ntype RowReceiver interface {\n\t// PushRow sends a row to this receiver. May block.\n\t// Returns true if the row was sent, or false if the receiver does not need\n\t// any more rows. In all cases, Close() still needs to be called.\n\t// The sender must not use the row anymore after calling this function.\n\tPushRow(row sqlbase.EncDatumRow) bool\n\t// Close is called when we have no more rows; it causes the RowReceiver to\n\t// process all rows and clean up. If err is not null, the error is sent to\n\t// the receiver (and the function may block).\n\tClose(err error)\n}\n```\nRowReceiver is any component of a flow that receives rows from another component. It can be an input synchronizer, a router, or a mailbox.\n\n```go\ntype RowSource interface {\n\t// NextRow retrieves the next row. Returns a nil row if there are no more\n\t// rows. Depending on the implementation, it may block.\n\tNextRow() (sqlbase.EncDatumRow, error)\n}\n```\nRowSource is any component of a flow that produces rows that cam be consumed by another component.\n\n```go\ntype ServerContext struct {\n\tDB *client.DB\n}\n```\nServerContext encompasses the configuration required to create a DistSQLServer.\n\n```go\ntype ServerImpl struct {\n\t// contains filtered or unexported fields\n}\n```\nServerImpl implements the server for the distributed SQL APIs.\n\n```go\nfunc NewServer(ctx ServerContext) *ServerImpl\n```\nNewServer instantiates a DistSQLServer.\n\n```go\nfunc (ds *ServerImpl) RunSimpleFlow(\n\treq *SetupFlowsRequest, stream DistSQL_RunSimpleFlowServer,\n) error\n```\nRunSimpleFlow is part of the DistSQLServer interface.\n\n```go\nfunc (ds *ServerImpl) SetupFlows(ctx context.Context, req *SetupFlowsRequest) (\n\t*SimpleResponse, error,\n)\n```\nSetupFlows is part of the DistSQLServer interface.\n\n```go\nfunc (ds *ServerImpl) SetupSimpleFlow(\n\tctx context.Context, req *SetupFlowsRequest, output RowReceiver,\n) (*Flow, error)\n```\nSetupSimpleFlow sets up a simple flow, connecting the simple response output stream to the given RowReceiver. The flow is not started.\n\n```go\ntype SetupFlowsRequest struct {\n\tTxn   cockroach_roachpb1.Transaction `protobuf:\"bytes,1,opt,name=txn\" json:\"txn\"`\n\tFlows []FlowSpec                     `protobuf:\"bytes,2,rep,name=flows\" json:\"flows\"`\n}\n```\n\n```go\nfunc (*SetupFlowsRequest) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *SetupFlowsRequest) Marshal() (data []byte, err error)\n```\n\n```go\nfunc (m *SetupFlowsRequest) MarshalTo(data []byte) (int, error)\n```\n\n```go\nfunc (*SetupFlowsRequest) ProtoMessage()\n```\n\n```go\nfunc (m *SetupFlowsRequest) Reset()\n```\n\n```go\nfunc (m *SetupFlowsRequest) Size() (n int)\n```\n\n```go\nfunc (m *SetupFlowsRequest) String() string\n```\n\n```go\nfunc (m *SetupFlowsRequest) Unmarshal(data []byte) error\n```\n\n```go\ntype SimpleResponse struct {\n\tError *cockroach_roachpb2.Error `protobuf:\"bytes,1,opt,name=error\" json:\"error,omitempty\"`\n}\n```\n\n```go\nfunc (*SimpleResponse) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *SimpleResponse) Marshal() (data []byte, err error)\n```\n\n```go\nfunc (m *SimpleResponse) MarshalTo(data []byte) (int, error)\n```\n\n```go\nfunc (*SimpleResponse) ProtoMessage()\n```\n\n```go\nfunc (m *SimpleResponse) Reset()\n```\n\n```go\nfunc (m *SimpleResponse) Size() (n int)\n```\n\n```go\nfunc (m *SimpleResponse) String() string\n```\n\n```go\nfunc (m *SimpleResponse) Unmarshal(data []byte) error\n```\n\n```go\ntype StreamData struct {\n\t// Encodes one or more data rows. Each datum is encoded according to the\n\t// corresponding DatumInfo.\n\tRawBytes []byte `protobuf:\"bytes,1,opt,name=raw_bytes,json=rawBytes\" json:\"raw_bytes,omitempty\"`\n}\n```\nStreamData is a message that can be sent multiple times as part of a stream.\n\n```go\nfunc (*StreamData) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *StreamData) Marshal() (data []byte, err error)\n```\n\n```go\nfunc (m *StreamData) MarshalTo(data []byte) (int, error)\n```\n\n```go\nfunc (*StreamData) ProtoMessage()\n```\n\n```go\nfunc (m *StreamData) Reset()\n```\n\n```go\nfunc (m *StreamData) Size() (n int)\n```\n\n```go\nfunc (m *StreamData) String() string\n```\n\n```go\nfunc (m *StreamData) Unmarshal(data []byte) error\n```\n\n```go\ntype StreamDecoder struct {\n\t// contains filtered or unexported fields\n}\n```\nStreamDecoder converts a sequence of StreamMessage to EncDatumRows.\n\nSample usage:\n\n\tsd := StreamDecoder{}\n\tvar row sqlbase.EncDatumRow\n\tfor each message in stream {\n\t    err := sd.AddMessage(msg)\n\t    if err != nil { ... }\n\t    for {\n\t        row, err := sd.GetRow(row)\n\t        if err != nil { ... }\n\t        if decoded != nil {\n\t            break\n\t        }\n\t        // Use \u003crow\u003e\n\t        ...\n\t    }\n\t}\n\nAddMessage can be called multiple times before getting the rows, but this will cause data to accumulate internally.\n\n```go\nfunc (sd *StreamDecoder) AddMessage(msg *StreamMessage) error\n```\nAddMessage adds the data in a StreamMessage to the decoder.\n\nThe StreamDecoder may keep a reference to msg.Data.RawBytes until all the rows in the message are retrieved with GetRow.\n\n```go\nfunc (sd *StreamDecoder) GetRow(rowBuf sqlbase.EncDatumRow) (sqlbase.EncDatumRow, error)\n```\nGetRow returns a row of EncDatums received in the stream. A row buffer can be provided optionally. Returns nil if there are no more rows received so far.\n\n```go\nfunc (sd *StreamDecoder) IsDone() (bool, error)\n```\nIsDone returns true if all the rows were returned and the stream trailer was received (in which case any error in the trailer is returned as well).\n\n```go\ntype StreamEncoder struct {\n\t// contains filtered or unexported fields\n}\n```\nStreamEncoder converts EncDatum rows into a sequence of StreamMessage.\n\nSample usage:\n\n\tse := StreamEncoder{}\n\n\tfor {\n\t    for ... {\n\t       err := se.AddRow(...)\n\t       ...\n\t    }\n\t    msg := se.FormMessage(false, nil)\n\t    // Send out message.\n\t    ...\n\t}\n\tmsg := se.FormMessage(true, nil)\n\t// Send out final message\n\t...\n\n```go\nfunc (se *StreamEncoder) AddRow(row sqlbase.EncDatumRow) error\n```\nAddRow encodes a row.\n\n```go\nfunc (se *StreamEncoder) FormMessage(final bool, trailerErr error) *StreamMessage\n```\nFormMessage populates a message containing the rows added since the last call to FormMessage. The returned StreamMessage should be treated as immutable. If final is true, a message trailer is populated with the given error.\n\n```go\ntype StreamEndpointSpec struct {\n\t// If set, both ends of the stream are part of the flow on this machine. There\n\t// will be a corresponding endpoint with the same local stream ID.\n\tLocalStreamID *int32 `protobuf:\"varint,1,opt,name=local_stream_id,json=localStreamId\" json:\"local_stream_id,omitempty\"`\n\t// If set, the stream crosses flows; the endpoint is a mailbox.\n\tMailbox *MailboxSpec `protobuf:\"bytes,2,opt,name=mailbox\" json:\"mailbox,omitempty\"`\n}\n```\nStreamEndpointSpec describes one of the endpoints (input or output) of a physical stream.\n\n```go\nfunc (*StreamEndpointSpec) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (this *StreamEndpointSpec) GetValue() interface{}\n```\n\n```go\nfunc (m *StreamEndpointSpec) Marshal() (data []byte, err error)\n```\n\n```go\nfunc (m *StreamEndpointSpec) MarshalTo(data []byte) (int, error)\n```\n\n```go\nfunc (*StreamEndpointSpec) ProtoMessage()\n```\n\n```go\nfunc (m *StreamEndpointSpec) Reset()\n```\n\n```go\nfunc (this *StreamEndpointSpec) SetValue(value interface{}) bool\n```\n\n```go\nfunc (m *StreamEndpointSpec) Size() (n int)\n```\n\n```go\nfunc (m *StreamEndpointSpec) String() string\n```\n\n```go\nfunc (m *StreamEndpointSpec) Unmarshal(data []byte) error\n```\n\n```go\ntype StreamHeader struct {\n\t// There is one DatumInfo for each element in a row.\n\tInfo []DatumInfo `protobuf:\"bytes,1,rep,name=info\" json:\"info\"`\n}\n```\nStreamHeader is a message that is sent once at the beginning of a stream.\n\n```go\nfunc (*StreamHeader) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *StreamHeader) Marshal() (data []byte, err error)\n```\n\n```go\nfunc (m *StreamHeader) MarshalTo(data []byte) (int, error)\n```\n\n```go\nfunc (*StreamHeader) ProtoMessage()\n```\n\n```go\nfunc (m *StreamHeader) Reset()\n```\n\n```go\nfunc (m *StreamHeader) Size() (n int)\n```\n\n```go\nfunc (m *StreamHeader) String() string\n```\n\n```go\nfunc (m *StreamHeader) Unmarshal(data []byte) error\n```\n\n```go\ntype StreamMessage struct {\n\t// Header is present in the first message.\n\tHeader *StreamHeader `protobuf:\"bytes,1,opt,name=header\" json:\"header,omitempty\"`\n\t// Data is present in all messages except possibly the first and last.\n\tData StreamData `protobuf:\"bytes,2,opt,name=data\" json:\"data\"`\n\t// Trailer is present in the last message.\n\tTrailer *StreamTrailer `protobuf:\"bytes,3,opt,name=trailer\" json:\"trailer,omitempty\"`\n}\n```\n\n```go\nfunc (*StreamMessage) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *StreamMessage) Marshal() (data []byte, err error)\n```\n\n```go\nfunc (m *StreamMessage) MarshalTo(data []byte) (int, error)\n```\n\n```go\nfunc (*StreamMessage) ProtoMessage()\n```\n\n```go\nfunc (m *StreamMessage) Reset()\n```\n\n```go\nfunc (m *StreamMessage) Size() (n int)\n```\n\n```go\nfunc (m *StreamMessage) String() string\n```\n\n```go\nfunc (m *StreamMessage) Unmarshal(data []byte) error\n```\n\n```go\ntype StreamMsg struct {\n\t// Only one of these fields will be set.\n\tRow sqlbase.EncDatumRow\n\tErr error\n}\n```\nStreamMsg is the message used in the channels that implement local physical streams.\n\n```go\ntype StreamTrailer struct {\n\tError *cockroach_roachpb2.Error `protobuf:\"bytes,1,opt,name=error\" json:\"error,omitempty\"`\n}\n```\nStreamTrailer is a message that is sent once at the end of a stream.\n\n```go\nfunc (*StreamTrailer) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *StreamTrailer) Marshal() (data []byte, err error)\n```\n\n```go\nfunc (m *StreamTrailer) MarshalTo(data []byte) (int, error)\n```\n\n```go\nfunc (*StreamTrailer) ProtoMessage()\n```\n\n```go\nfunc (m *StreamTrailer) Reset()\n```\n\n```go\nfunc (m *StreamTrailer) Size() (n int)\n```\n\n```go\nfunc (m *StreamTrailer) String() string\n```\n\n```go\nfunc (m *StreamTrailer) Unmarshal(data []byte) error\n```\n\n```go\ntype TableReaderSpan struct {\n\t// TODO(radu): the dist_sql APIs should be agnostic to how we map tables to\n\t// KVs. The span should be described as starting and ending lists of values\n\t// for a prefix of the index columns, along with inclusive/exclusive flags.\n\tSpan cockroach_roachpb1.Span `protobuf:\"bytes,1,opt,name=span\" json:\"span\"`\n}\n```\n\n```go\nfunc (*TableReaderSpan) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *TableReaderSpan) Marshal() (data []byte, err error)\n```\n\n```go\nfunc (m *TableReaderSpan) MarshalTo(data []byte) (int, error)\n```\n\n```go\nfunc (*TableReaderSpan) ProtoMessage()\n```\n\n```go\nfunc (m *TableReaderSpan) Reset()\n```\n\n```go\nfunc (m *TableReaderSpan) Size() (n int)\n```\n\n```go\nfunc (m *TableReaderSpan) String() string\n```\n\n```go\nfunc (m *TableReaderSpan) Unmarshal(data []byte) error\n```\n\n```go\ntype TableReaderSpec struct {\n\tTable cockroach_sql_sqlbase1.TableDescriptor `protobuf:\"bytes,1,opt,name=table\" json:\"table\"`\n\t// If 0, we use the primary index. If non-zero, we use the index_idx-th index,\n\t// i.e. table.indexes[index_idx-1]\n\tIndexIdx uint32            `protobuf:\"varint,2,opt,name=index_idx,json=indexIdx\" json:\"index_idx\"`\n\tReverse  bool              `protobuf:\"varint,3,opt,name=reverse\" json:\"reverse\"`\n\tSpans    []TableReaderSpan `protobuf:\"bytes,4,rep,name=spans\" json:\"spans\"`\n\t// The filter expression references the columns in the table (table.columns)\n\t// via $0, $1, etc. If a secondary index is used, the columns that are not\n\t// available as part of the index cannot be referenced.\n\tFilter Expression `protobuf:\"bytes,5,opt,name=filter\" json:\"filter\"`\n\t// The table reader will only produce values for these columns, referenced by\n\t// their indices in table.columns.\n\tOutputColumns []uint32 `protobuf:\"varint,6,rep,packed,name=output_columns,json=outputColumns\" json:\"output_columns,omitempty\"`\n\t// If nonzero, the table reader only needs to return this many rows.\n\tHardLimit int64 `protobuf:\"varint,8,opt,name=hard_limit,json=hardLimit\" json:\"hard_limit\"`\n\t// The soft limit is a hint for how many rows the consumer of the table reader\n\t// output might need. If both the hard limit and the soft limit are set, the\n\t// soft limit must be lower than the hard limit.\n\tSoftLimit int64 `protobuf:\"varint,7,opt,name=soft_limit,json=softLimit\" json:\"soft_limit\"`\n}\n```\nTableReaderSpec is the specification for a table reader. A table reader performs KV operations to retrieve rows for a table and outputs the desired columns of the rows that pass a filter expression.\n\n```go\nfunc (*TableReaderSpec) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *TableReaderSpec) Marshal() (data []byte, err error)\n```\n\n```go\nfunc (m *TableReaderSpec) MarshalTo(data []byte) (int, error)\n```\n\n```go\nfunc (*TableReaderSpec) ProtoMessage()\n```\n\n```go\nfunc (m *TableReaderSpec) Reset()\n```\n\n```go\nfunc (m *TableReaderSpec) Size() (n int)\n```\n\n```go\nfunc (m *TableReaderSpec) String() string\n```\n\n```go\nfunc (m *TableReaderSpec) Unmarshal(data []byte) error\n```\n\n","path":"github.com/objectundefined/cockroach/sql/distsql","name":"distsql","synopsis":"Package distsql is a generated protocol buffer package.","isRedistributable":true}
