golsql

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Comparator_name = map[int32]string{
		0: "UNKNOWN_COMPARATOR",
		1: "EQUAL",
		2: "FUZZY_EQUAL",
		3: "GREATER_THAN",
		4: "LESS_THAN",
		5: "GREATER_THAN_OR_EQUAL",
		6: "LESS_THAN_OR_EQUAL",
		7: "IS_NULL",
	}
	Comparator_value = map[string]int32{
		"UNKNOWN_COMPARATOR":    0,
		"EQUAL":                 1,
		"FUZZY_EQUAL":           2,
		"GREATER_THAN":          3,
		"LESS_THAN":             4,
		"GREATER_THAN_OR_EQUAL": 5,
		"LESS_THAN_OR_EQUAL":    6,
		"IS_NULL":               7,
	}
)

Enum value maps for Comparator.

View Source
var (
	GroupOperator_name = map[int32]string{
		0: "UNKNOWN_GROUPOPERATOR",
		1: "AND",
		2: "OR",
		3: "XOR",
	}
	GroupOperator_value = map[string]int32{
		"UNKNOWN_GROUPOPERATOR": 0,
		"AND":                   1,
		"OR":                    2,
		"XOR":                   3,
	}
)

Enum value maps for GroupOperator.

View Source
var File_query_proto protoreflect.FileDescriptor
View Source
var File_result_proto protoreflect.FileDescriptor
View Source
var File_service_proto protoreflect.FileDescriptor

Functions

func RegisterDataSourceServer

func RegisterDataSourceServer(s *grpc.Server, srv DataSourceServer)

Types

type Comparator

type Comparator int32
const (
	// Invalid, only used as a default in error states
	Comparator_UNKNOWN_COMPARATOR    Comparator = 0
	Comparator_EQUAL                 Comparator = 1
	Comparator_FUZZY_EQUAL           Comparator = 2
	Comparator_GREATER_THAN          Comparator = 3
	Comparator_LESS_THAN             Comparator = 4
	Comparator_GREATER_THAN_OR_EQUAL Comparator = 5
	Comparator_LESS_THAN_OR_EQUAL    Comparator = 6
	Comparator_IS_NULL               Comparator = 7
)

func (Comparator) Descriptor

func (Comparator) Descriptor() protoreflect.EnumDescriptor

func (Comparator) Enum

func (x Comparator) Enum() *Comparator

func (Comparator) EnumDescriptor deprecated

func (Comparator) EnumDescriptor() ([]byte, []int)

Deprecated: Use Comparator.Descriptor instead.

func (Comparator) Number

func (x Comparator) Number() protoreflect.EnumNumber

func (Comparator) String

func (x Comparator) String() string

func (Comparator) Type

type DataSourceClient

type DataSourceClient interface {
	Execute(ctx context.Context, in *Query, opts ...grpc.CallOption) (*Result, error)
	ExecuteBatch(ctx context.Context, opts ...grpc.CallOption) (DataSource_ExecuteBatchClient, error)
}

DataSourceClient is the client API for DataSource service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.golang.ir/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewDataSourceClient

func NewDataSourceClient(cc grpc.ClientConnInterface) DataSourceClient

type DataSourceServer

type DataSourceServer interface {
	Execute(context.Context, *Query) (*Result, error)
	ExecuteBatch(DataSource_ExecuteBatchServer) error
	// contains filtered or unexported methods
}

DataSourceServer is the server API for DataSource service. All implementations must embed UnimplementedDataSourceServer for forward compatibility

type DataSource_ExecuteBatchClient

type DataSource_ExecuteBatchClient interface {
	Send(*Query) error
	Recv() (*StreamResult, error)
	grpc.ClientStream
}

type DataSource_ExecuteBatchServer

type DataSource_ExecuteBatchServer interface {
	Send(*StreamResult) error
	Recv() (*Query, error)
	grpc.ServerStream
}

type DomainJoins

type DomainJoins struct {
	// contains filtered or unexported fields
}

func (*DomainJoins) Descriptor deprecated

func (*DomainJoins) Descriptor() ([]byte, []int)

Deprecated: Use DomainJoins.ProtoReflect.Descriptor instead.

func (*DomainJoins) ProtoMessage

func (*DomainJoins) ProtoMessage()

func (*DomainJoins) ProtoReflect

func (x *DomainJoins) ProtoReflect() protoreflect.Message

func (*DomainJoins) Reset

func (x *DomainJoins) Reset()

func (*DomainJoins) String

func (x *DomainJoins) String() string

type GroupOperator

type GroupOperator int32
const (
	// Invalid, only used as a default in error states
	GroupOperator_UNKNOWN_GROUPOPERATOR GroupOperator = 0
	GroupOperator_AND                   GroupOperator = 1
	GroupOperator_OR                    GroupOperator = 2
	GroupOperator_XOR                   GroupOperator = 3
)

func (GroupOperator) Descriptor

func (GroupOperator) Enum

func (x GroupOperator) Enum() *GroupOperator

func (GroupOperator) EnumDescriptor deprecated

func (GroupOperator) EnumDescriptor() ([]byte, []int)

Deprecated: Use GroupOperator.Descriptor instead.

func (GroupOperator) Number

func (GroupOperator) String

func (x GroupOperator) String() string

func (GroupOperator) Type

type Ordering

type Ordering struct {

	// Priority must be set to a unique value if ordering is present for an item, duplicate priorities within a request is considered an error
	Priority   uint32 `protobuf:"varint,1,opt,name=priority,proto3" json:"priority,omitempty"`
	Descending bool   `protobuf:"varint,2,opt,name=descending,proto3" json:"descending,omitempty"`
	// contains filtered or unexported fields
}

func (*Ordering) Descriptor deprecated

func (*Ordering) Descriptor() ([]byte, []int)

Deprecated: Use Ordering.ProtoReflect.Descriptor instead.

func (*Ordering) GetDescending

func (x *Ordering) GetDescending() bool

func (*Ordering) GetPriority

func (x *Ordering) GetPriority() uint32

func (*Ordering) ProtoMessage

func (*Ordering) ProtoMessage()

func (*Ordering) ProtoReflect

func (x *Ordering) ProtoReflect() protoreflect.Message

func (*Ordering) Reset

func (x *Ordering) Reset()

func (*Ordering) String

func (x *Ordering) String() string

type Paging

type Paging struct {
	Limit  uint64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
	Offset uint64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
	// contains filtered or unexported fields
}

func (*Paging) Descriptor deprecated

func (*Paging) Descriptor() ([]byte, []int)

Deprecated: Use Paging.ProtoReflect.Descriptor instead.

func (*Paging) GetLimit

func (x *Paging) GetLimit() uint64

func (*Paging) GetOffset

func (x *Paging) GetOffset() uint64

func (*Paging) ProtoMessage

func (*Paging) ProtoMessage()

func (*Paging) ProtoReflect

func (x *Paging) ProtoReflect() protoreflect.Message

func (*Paging) Reset

func (x *Paging) Reset()

func (*Paging) String

func (x *Paging) String() string

type Query

type Query struct {

	// A UUID generated for this query for idempotence and caching reasons, must be non-empty.
	// Repeated values may have their contents ignored by the server if it chooses to return cached content.
	// Servers must still correctly obey authC and authZ logic when choosing to return cached content based on ID.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Types that are assignable to DomainSpace:
	//	*Query_Domain
	DomainSpace isQuery_DomainSpace `protobuf_oneof:"domain_space"`
	Paging      *Paging             `protobuf:"bytes,2,opt,name=paging,proto3" json:"paging,omitempty"`
	Where       *WhereGroup         `protobuf:"bytes,3,opt,name=where,proto3" json:"where,omitempty"`
	// contains filtered or unexported fields
}

func (*Query) Descriptor deprecated

func (*Query) Descriptor() ([]byte, []int)

Deprecated: Use Query.ProtoReflect.Descriptor instead.

func (*Query) GetDomain

func (x *Query) GetDomain() string

func (*Query) GetDomainSpace

func (m *Query) GetDomainSpace() isQuery_DomainSpace

func (*Query) GetId

func (x *Query) GetId() string

func (*Query) GetPaging

func (x *Query) GetPaging() *Paging

func (*Query) GetWhere

func (x *Query) GetWhere() *WhereGroup

func (*Query) ProtoMessage

func (*Query) ProtoMessage()

func (*Query) ProtoReflect

func (x *Query) ProtoReflect() protoreflect.Message

func (*Query) Reset

func (x *Query) Reset()

func (*Query) String

func (x *Query) String() string

type Query_Domain

type Query_Domain struct {
	Domain string `protobuf:"bytes,101,opt,name=domain,proto3,oneof"` // DomainJoins domains = 102; // TODO
}

type Result

type Result struct {
	Data []*_struct.Struct `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*Result) Descriptor deprecated

func (*Result) Descriptor() ([]byte, []int)

Deprecated: Use Result.ProtoReflect.Descriptor instead.

func (*Result) GetData

func (x *Result) GetData() []*_struct.Struct

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) ProtoReflect

func (x *Result) ProtoReflect() protoreflect.Message

func (*Result) Reset

func (x *Result) Reset()

func (*Result) String

func (x *Result) String() string

type StreamResult

type StreamResult struct {

	// ID allows mapping of streamed results back to streamed requests
	Id   string            `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Data []*_struct.Struct `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamResult) Descriptor deprecated

func (*StreamResult) Descriptor() ([]byte, []int)

Deprecated: Use StreamResult.ProtoReflect.Descriptor instead.

func (*StreamResult) GetData

func (x *StreamResult) GetData() []*_struct.Struct

func (*StreamResult) GetId

func (x *StreamResult) GetId() string

func (*StreamResult) ProtoMessage

func (*StreamResult) ProtoMessage()

func (*StreamResult) ProtoReflect

func (x *StreamResult) ProtoReflect() protoreflect.Message

func (*StreamResult) Reset

func (x *StreamResult) Reset()

func (*StreamResult) String

func (x *StreamResult) String() string

type UnimplementedDataSourceServer

type UnimplementedDataSourceServer struct {
}

UnimplementedDataSourceServer must be embedded to have forward compatible implementations.

func (UnimplementedDataSourceServer) Execute

func (UnimplementedDataSourceServer) ExecuteBatch

type UnsafeDataSourceServer

type UnsafeDataSourceServer interface {
	// contains filtered or unexported methods
}

UnsafeDataSourceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DataSourceServer will result in compilation errors.

type WhereField

type WhereField struct {
	FieldName        string     `protobuf:"bytes,1,opt,name=field_name,json=fieldName,proto3" json:"field_name,omitempty"`
	NegateComparator bool       `protobuf:"varint,2,opt,name=negate_comparator,json=negateComparator,proto3" json:"negate_comparator,omitempty"`
	Comparator       Comparator `protobuf:"varint,3,opt,name=comparator,proto3,enum=Comparator" json:"comparator,omitempty"`
	// DomainName is optional if only one domain is present, but mandatory if multiple domains are present
	DomainName string `protobuf:"bytes,4,opt,name=domain_name,json=domainName,proto3" json:"domain_name,omitempty"`
	// Types that are assignable to Value:
	//	*WhereField_StringValue
	//	*WhereField_Int64Value
	//	*WhereField_Uint64Value
	//	*WhereField_DoubleValue
	//	*WhereField_BoolValue
	//	*WhereField_BytesValue
	//	*WhereField_TimeValue
	Value isWhereField_Value `protobuf_oneof:"value"`
	// Ordering is optional, unless the RDBMS on the other end requires it,
	// but it is the responsibility of the server directly interfacing with the RDBMS to understand the requirements of its data source.
	Ordering *Ordering `protobuf:"bytes,5,opt,name=ordering,proto3" json:"ordering,omitempty"`
	// contains filtered or unexported fields
}

func (*WhereField) Descriptor deprecated

func (*WhereField) Descriptor() ([]byte, []int)

Deprecated: Use WhereField.ProtoReflect.Descriptor instead.

func (*WhereField) GetBoolValue

func (x *WhereField) GetBoolValue() bool

func (*WhereField) GetBytesValue

func (x *WhereField) GetBytesValue() []byte

func (*WhereField) GetComparator

func (x *WhereField) GetComparator() Comparator

func (*WhereField) GetDomainName

func (x *WhereField) GetDomainName() string

func (*WhereField) GetDoubleValue

func (x *WhereField) GetDoubleValue() float64

func (*WhereField) GetFieldName

func (x *WhereField) GetFieldName() string

func (*WhereField) GetInt64Value

func (x *WhereField) GetInt64Value() int64

func (*WhereField) GetNegateComparator

func (x *WhereField) GetNegateComparator() bool

func (*WhereField) GetOrdering

func (x *WhereField) GetOrdering() *Ordering

func (*WhereField) GetStringValue

func (x *WhereField) GetStringValue() string

func (*WhereField) GetTimeValue

func (x *WhereField) GetTimeValue() *timestamp.Timestamp

func (*WhereField) GetUint64Value

func (x *WhereField) GetUint64Value() uint64

func (*WhereField) GetValue

func (m *WhereField) GetValue() isWhereField_Value

func (*WhereField) ProtoMessage

func (*WhereField) ProtoMessage()

func (*WhereField) ProtoReflect

func (x *WhereField) ProtoReflect() protoreflect.Message

func (*WhereField) Reset

func (x *WhereField) Reset()

func (*WhereField) String

func (x *WhereField) String() string

type WhereField_BoolValue

type WhereField_BoolValue struct {
	BoolValue bool `protobuf:"varint,105,opt,name=bool_value,json=boolValue,proto3,oneof"`
}

type WhereField_BytesValue

type WhereField_BytesValue struct {
	BytesValue []byte `protobuf:"bytes,106,opt,name=bytes_value,json=bytesValue,proto3,oneof"`
}

type WhereField_DoubleValue

type WhereField_DoubleValue struct {
	DoubleValue float64 `protobuf:"fixed64,104,opt,name=double_value,json=doubleValue,proto3,oneof"`
}

type WhereField_Int64Value

type WhereField_Int64Value struct {
	Int64Value int64 `protobuf:"varint,102,opt,name=int64_value,json=int64Value,proto3,oneof"`
}

type WhereField_StringValue

type WhereField_StringValue struct {
	StringValue string `protobuf:"bytes,101,opt,name=string_value,json=stringValue,proto3,oneof"`
}

type WhereField_TimeValue

type WhereField_TimeValue struct {
	TimeValue *timestamp.Timestamp `protobuf:"bytes,107,opt,name=time_value,json=timeValue,proto3,oneof"` // TODO: other basic types I'm forgetting?
}

type WhereField_Uint64Value

type WhereField_Uint64Value struct {
	Uint64Value uint64 `protobuf:"varint,103,opt,name=uint64_value,json=uint64Value,proto3,oneof"`
}

type WhereGroup

type WhereGroup struct {
	Elements       []*WhereGroupElement `protobuf:"bytes,1,rep,name=elements,proto3" json:"elements,omitempty"`
	NegateOperator bool                 `protobuf:"varint,2,opt,name=negate_operator,json=negateOperator,proto3" json:"negate_operator,omitempty"`
	Operator       GroupOperator        `protobuf:"varint,3,opt,name=operator,proto3,enum=GroupOperator" json:"operator,omitempty"`
	// contains filtered or unexported fields
}

func (*WhereGroup) Descriptor deprecated

func (*WhereGroup) Descriptor() ([]byte, []int)

Deprecated: Use WhereGroup.ProtoReflect.Descriptor instead.

func (*WhereGroup) GetElements

func (x *WhereGroup) GetElements() []*WhereGroupElement

func (*WhereGroup) GetNegateOperator

func (x *WhereGroup) GetNegateOperator() bool

func (*WhereGroup) GetOperator

func (x *WhereGroup) GetOperator() GroupOperator

func (*WhereGroup) ProtoMessage

func (*WhereGroup) ProtoMessage()

func (*WhereGroup) ProtoReflect

func (x *WhereGroup) ProtoReflect() protoreflect.Message

func (*WhereGroup) Reset

func (x *WhereGroup) Reset()

func (*WhereGroup) String

func (x *WhereGroup) String() string

type WhereGroupElement

type WhereGroupElement struct {

	// Types that are assignable to Element:
	//	*WhereGroupElement_Field
	//	*WhereGroupElement_Group
	Element isWhereGroupElement_Element `protobuf_oneof:"element"`
	// contains filtered or unexported fields
}

func (*WhereGroupElement) Descriptor deprecated

func (*WhereGroupElement) Descriptor() ([]byte, []int)

Deprecated: Use WhereGroupElement.ProtoReflect.Descriptor instead.

func (*WhereGroupElement) GetElement

func (m *WhereGroupElement) GetElement() isWhereGroupElement_Element

func (*WhereGroupElement) GetField

func (x *WhereGroupElement) GetField() *WhereField

func (*WhereGroupElement) GetGroup

func (x *WhereGroupElement) GetGroup() *WhereGroup

func (*WhereGroupElement) ProtoMessage

func (*WhereGroupElement) ProtoMessage()

func (*WhereGroupElement) ProtoReflect

func (x *WhereGroupElement) ProtoReflect() protoreflect.Message

func (*WhereGroupElement) Reset

func (x *WhereGroupElement) Reset()

func (*WhereGroupElement) String

func (x *WhereGroupElement) String() string

type WhereGroupElement_Field

type WhereGroupElement_Field struct {
	Field *WhereField `protobuf:"bytes,101,opt,name=field,proto3,oneof"`
}

type WhereGroupElement_Group

type WhereGroupElement_Group struct {
	Group *WhereGroup `protobuf:"bytes,102,opt,name=group,proto3,oneof"`
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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