// Code generated by protoc-gen-go. DO NOT EDIT.
// source: query_driver.proto

package proto

import proto1 "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"

import (
	context "golang.org/x/net/context"
	grpc "google.golang.org/grpc"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto1.Marshal
var _ = fmt.Errorf
var _ = math.Inf

type QueryPrepareRequest struct {
	Sql  string            `protobuf:"bytes,1,opt,name=sql" json:"sql,omitempty"`
	Conf *QueryPrepareConf `protobuf:"bytes,2,opt,name=conf" json:"conf,omitempty"`
}

func (m *QueryPrepareRequest) Reset()                    { *m = QueryPrepareRequest{} }
func (m *QueryPrepareRequest) String() string            { return proto1.CompactTextString(m) }
func (*QueryPrepareRequest) ProtoMessage()               {}
func (*QueryPrepareRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }

func (m *QueryPrepareRequest) GetSql() string {
	if m != nil {
		return m.Sql
	}
	return ""
}

func (m *QueryPrepareRequest) GetConf() *QueryPrepareConf {
	if m != nil {
		return m.Conf
	}
	return nil
}

type QueryPrepareConf struct {
	Limit  uint32 `protobuf:"varint,1,opt,name=limit" json:"limit,omitempty"`
	Offset uint32 `protobuf:"varint,2,opt,name=offset" json:"offset,omitempty"`
}

func (m *QueryPrepareConf) Reset()                    { *m = QueryPrepareConf{} }
func (m *QueryPrepareConf) String() string            { return proto1.CompactTextString(m) }
func (*QueryPrepareConf) ProtoMessage()               {}
func (*QueryPrepareConf) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} }

func (m *QueryPrepareConf) GetLimit() uint32 {
	if m != nil {
		return m.Limit
	}
	return 0
}

func (m *QueryPrepareConf) GetOffset() uint32 {
	if m != nil {
		return m.Offset
	}
	return 0
}

type QueryPrepareResponse struct {
	NewSql    string `protobuf:"bytes,1,opt,name=newSql" json:"newSql,omitempty"`
	ErrorType string `protobuf:"bytes,2,opt,name=errorType" json:"errorType,omitempty"`
	Error     string `protobuf:"bytes,3,opt,name=error" json:"error,omitempty"`
}

func (m *QueryPrepareResponse) Reset()                    { *m = QueryPrepareResponse{} }
func (m *QueryPrepareResponse) String() string            { return proto1.CompactTextString(m) }
func (*QueryPrepareResponse) ProtoMessage()               {}
func (*QueryPrepareResponse) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{2} }

func (m *QueryPrepareResponse) GetNewSql() string {
	if m != nil {
		return m.NewSql
	}
	return ""
}

func (m *QueryPrepareResponse) GetErrorType() string {
	if m != nil {
		return m.ErrorType
	}
	return ""
}

func (m *QueryPrepareResponse) GetError() string {
	if m != nil {
		return m.Error
	}
	return ""
}

type QueryRequest struct {
	Sql  string     `protobuf:"bytes,1,opt,name=sql" json:"sql,omitempty"`
	Conf *QueryConf `protobuf:"bytes,2,opt,name=conf" json:"conf,omitempty"`
}

func (m *QueryRequest) Reset()                    { *m = QueryRequest{} }
func (m *QueryRequest) String() string            { return proto1.CompactTextString(m) }
func (*QueryRequest) ProtoMessage()               {}
func (*QueryRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{3} }

func (m *QueryRequest) GetSql() string {
	if m != nil {
		return m.Sql
	}
	return ""
}

func (m *QueryRequest) GetConf() *QueryConf {
	if m != nil {
		return m.Conf
	}
	return nil
}

type QueryConf struct {
	TimeOutSecond uint32 `protobuf:"varint,1,opt,name=timeOutSecond" json:"timeOutSecond,omitempty"`
}

func (m *QueryConf) Reset()                    { *m = QueryConf{} }
func (m *QueryConf) String() string            { return proto1.CompactTextString(m) }
func (*QueryConf) ProtoMessage()               {}
func (*QueryConf) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{4} }

func (m *QueryConf) GetTimeOutSecond() uint32 {
	if m != nil {
		return m.TimeOutSecond
	}
	return 0
}

type QueryResponse struct {
	Column []*Param          `protobuf:"bytes,1,rep,name=column" json:"column,omitempty"`
	Rows   []*QueryResultRow `protobuf:"bytes,2,rep,name=rows" json:"rows,omitempty"`
}

func (m *QueryResponse) Reset()                    { *m = QueryResponse{} }
func (m *QueryResponse) String() string            { return proto1.CompactTextString(m) }
func (*QueryResponse) ProtoMessage()               {}
func (*QueryResponse) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{5} }

func (m *QueryResponse) GetColumn() []*Param {
	if m != nil {
		return m.Column
	}
	return nil
}

func (m *QueryResponse) GetRows() []*QueryResultRow {
	if m != nil {
		return m.Rows
	}
	return nil
}

type QueryResultRow struct {
	Values []*QueryResultValue `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"`
}

func (m *QueryResultRow) Reset()                    { *m = QueryResultRow{} }
func (m *QueryResultRow) String() string            { return proto1.CompactTextString(m) }
func (*QueryResultRow) ProtoMessage()               {}
func (*QueryResultRow) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{6} }

func (m *QueryResultRow) GetValues() []*QueryResultValue {
	if m != nil {
		return m.Values
	}
	return nil
}

type QueryResultValue struct {
	Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"`
}

func (m *QueryResultValue) Reset()                    { *m = QueryResultValue{} }
func (m *QueryResultValue) String() string            { return proto1.CompactTextString(m) }
func (*QueryResultValue) ProtoMessage()               {}
func (*QueryResultValue) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{7} }

func (m *QueryResultValue) GetValue() string {
	if m != nil {
		return m.Value
	}
	return ""
}

func init() {
	proto1.RegisterType((*QueryPrepareRequest)(nil), "proto.QueryPrepareRequest")
	proto1.RegisterType((*QueryPrepareConf)(nil), "proto.QueryPrepareConf")
	proto1.RegisterType((*QueryPrepareResponse)(nil), "proto.QueryPrepareResponse")
	proto1.RegisterType((*QueryRequest)(nil), "proto.QueryRequest")
	proto1.RegisterType((*QueryConf)(nil), "proto.QueryConf")
	proto1.RegisterType((*QueryResponse)(nil), "proto.QueryResponse")
	proto1.RegisterType((*QueryResultRow)(nil), "proto.QueryResultRow")
	proto1.RegisterType((*QueryResultValue)(nil), "proto.QueryResultValue")
}

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4

// Client API for QueryDriver service

type QueryDriverClient interface {
	// Init will should be called at first before calling following methods.
	// It will pass some necessary info to plugin server. In the beginning,
	// we consider that put this info to the executable binary environment.
	// We put all communication on gRPC for unification in the end.
	Init(ctx context.Context, in *InitRequest, opts ...grpc.CallOption) (*Empty, error)
	QueryPrepare(ctx context.Context, in *QueryPrepareRequest, opts ...grpc.CallOption) (*QueryPrepareResponse, error)
	Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error)
}

type queryDriverClient struct {
	cc *grpc.ClientConn
}

func NewQueryDriverClient(cc *grpc.ClientConn) QueryDriverClient {
	return &queryDriverClient{cc}
}

func (c *queryDriverClient) Init(ctx context.Context, in *InitRequest, opts ...grpc.CallOption) (*Empty, error) {
	out := new(Empty)
	err := grpc.Invoke(ctx, "/proto.QueryDriver/Init", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *queryDriverClient) QueryPrepare(ctx context.Context, in *QueryPrepareRequest, opts ...grpc.CallOption) (*QueryPrepareResponse, error) {
	out := new(QueryPrepareResponse)
	err := grpc.Invoke(ctx, "/proto.QueryDriver/QueryPrepare", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *queryDriverClient) Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) {
	out := new(QueryResponse)
	err := grpc.Invoke(ctx, "/proto.QueryDriver/Query", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// Server API for QueryDriver service

type QueryDriverServer interface {
	// Init will should be called at first before calling following methods.
	// It will pass some necessary info to plugin server. In the beginning,
	// we consider that put this info to the executable binary environment.
	// We put all communication on gRPC for unification in the end.
	Init(context.Context, *InitRequest) (*Empty, error)
	QueryPrepare(context.Context, *QueryPrepareRequest) (*QueryPrepareResponse, error)
	Query(context.Context, *QueryRequest) (*QueryResponse, error)
}

func RegisterQueryDriverServer(s *grpc.Server, srv QueryDriverServer) {
	s.RegisterService(&_QueryDriver_serviceDesc, srv)
}

func _QueryDriver_Init_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(InitRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(QueryDriverServer).Init(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/proto.QueryDriver/Init",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(QueryDriverServer).Init(ctx, req.(*InitRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _QueryDriver_QueryPrepare_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(QueryPrepareRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(QueryDriverServer).QueryPrepare(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/proto.QueryDriver/QueryPrepare",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(QueryDriverServer).QueryPrepare(ctx, req.(*QueryPrepareRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _QueryDriver_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(QueryRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(QueryDriverServer).Query(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/proto.QueryDriver/Query",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(QueryDriverServer).Query(ctx, req.(*QueryRequest))
	}
	return interceptor(ctx, in, info, handler)
}

var _QueryDriver_serviceDesc = grpc.ServiceDesc{
	ServiceName: "proto.QueryDriver",
	HandlerType: (*QueryDriverServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Init",
			Handler:    _QueryDriver_Init_Handler,
		},
		{
			MethodName: "QueryPrepare",
			Handler:    _QueryDriver_QueryPrepare_Handler,
		},
		{
			MethodName: "Query",
			Handler:    _QueryDriver_Query_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "query_driver.proto",
}

func init() { proto1.RegisterFile("query_driver.proto", fileDescriptor2) }

var fileDescriptor2 = []byte{
	// 409 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x52, 0x4d, 0x6f, 0xd3, 0x40,
	0x10, 0x95, 0x9b, 0xc4, 0xc2, 0x93, 0x18, 0x45, 0xd3, 0x40, 0xad, 0xc0, 0x21, 0xb2, 0x72, 0x30,
	0x42, 0x4a, 0x85, 0x39, 0x72, 0xe1, 0x1b, 0x71, 0xa2, 0x6c, 0x2b, 0x0e, 0x5c, 0xc0, 0x4d, 0xd7,
	0x92, 0x25, 0xdb, 0xeb, 0xec, 0xae, 0x1b, 0xe5, 0x7f, 0xf1, 0x03, 0x91, 0xc7, 0x93, 0x60, 0x87,
	0xf4, 0x64, 0xbf, 0x79, 0x6f, 0xf6, 0xed, 0x9b, 0x59, 0xc0, 0x4d, 0x2d, 0xf5, 0xee, 0xd7, 0x9d,
	0xce, 0xee, 0xa5, 0x5e, 0x55, 0x5a, 0x59, 0x85, 0x23, 0xfa, 0xcc, 0x27, 0xdd, 0x62, 0x78, 0x03,
	0xe7, 0xdf, 0x1b, 0xe9, 0x95, 0x96, 0x55, 0xa2, 0xa5, 0x90, 0x9b, 0x5a, 0x1a, 0x8b, 0x53, 0x18,
	0x98, 0x4d, 0x1e, 0x38, 0x0b, 0x27, 0xf2, 0x44, 0xf3, 0x8b, 0x2f, 0x61, 0xb8, 0x56, 0x65, 0x1a,
	0x9c, 0x2d, 0x9c, 0x68, 0x1c, 0x5f, 0x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