cql

package
v0.0.0-...-4eef59b Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package cql is a generated protocol buffer package.

It is generated from these files:

doc.proto

It has these top-level messages:

UintProp
EnumProp
StrProp
Document
DocumentWithIdx
DocumentDel

Index

Constants

View Source
const (
	TypeUint8 = iota //0
	TypeUint16
	TypeUint32
	TypeUint64
	TypeEnum
	TypeStr
)
View Source
const (
	DEFAULT_LIMIT = 100
)

Variables

View Source
var (
	ErrInvalidLengthDoc = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowDoc   = fmt.Errorf("proto: integer overflow")
)

Functions

func Float32ToSortableUint64

func Float32ToSortableUint64(valS string) (val uint64, err error)

Float32ToSortableUint64 converts a float32 string to sortable uint64.

Refers to: github.com/apache/lucene-solr/lucene/core/src/java/org/apache/lucene/util/NumericUtils.java,

public static int floatToSortableInt(float value);
public static long doubleToSortableLong(double value);

https://en.wikipedia.org/wiki/Single-precision_floating-point_format https://en.wikipedia.org/wiki/Double-precision_floating-point_format

func Float64ToSortableUint64

func Float64ToSortableUint64(valS string) (val uint64, err error)

Float64ToSortableUint64 converts a float64 string to sortable uint64.

func ParseCql

func ParseCql(cql string, docProts map[string]*Document) (res interface{}, err error)

ParseCql parse CQL. res type is one of CqlCreate/CqlDestroy/CqlInsert/CqlDel/CqlQuery.

func ParseUintProp

func ParseUintProp(uintProp *UintProp, valS string) (val uint64, err error)

ParseUintProp parses valS

Types

type CqlCreate

type CqlCreate struct {
	DocumentWithIdx
}

type CqlDel

type CqlDel struct {
	DocumentWithIdx
}

type CqlDestroy

type CqlDestroy struct {
	Index string
}

type CqlInsert

type CqlInsert struct {
	DocumentWithIdx
}

type CqlSelect

type CqlSelect struct {
	Index     string
	UintPreds map[string]UintPred
	EnumPreds map[string]EnumPred
	StrPreds  map[string]StrPred
	OrderBy   string
	Limit     int
}

type Document

type Document struct {
	DocID            uint64      `protobuf:"varint,1,opt,name=docID" json:"docID"`
	UintProps        []*UintProp `protobuf:"bytes,2,rep,name=uintProps" json:"uintProps,omitempty"`
	EnumProps        []*EnumProp `protobuf:"bytes,3,rep,name=enumProps" json:"enumProps,omitempty"`
	StrProps         []*StrProp  `protobuf:"bytes,4,rep,name=strProps" json:"strProps,omitempty"`
	XXX_unrecognized []byte      `json:"-"`
}

func (*Document) Descriptor

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

func (*Document) Marshal

func (m *Document) Marshal() (dAtA []byte, err error)

func (*Document) MarshalTo

func (m *Document) MarshalTo(dAtA []byte) (int, error)

func (*Document) ProtoMessage

func (*Document) ProtoMessage()

func (*Document) Reset

func (m *Document) Reset()

func (*Document) Size

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

func (*Document) String

func (m *Document) String() string

func (*Document) Unmarshal

func (m *Document) Unmarshal(dAtA []byte) error

type DocumentDel

type DocumentDel struct {
	Index            string `protobuf:"bytes,1,opt,name=index" json:"index"`
	DocID            uint64 `protobuf:"varint,2,opt,name=docID" json:"docID"`
	XXX_unrecognized []byte `json:"-"`
}

func (*DocumentDel) Descriptor

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

func (*DocumentDel) Marshal

func (m *DocumentDel) Marshal() (dAtA []byte, err error)

func (*DocumentDel) MarshalTo

func (m *DocumentDel) MarshalTo(dAtA []byte) (int, error)

func (*DocumentDel) ProtoMessage

func (*DocumentDel) ProtoMessage()

func (*DocumentDel) Reset

func (m *DocumentDel) Reset()

func (*DocumentDel) Size

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

func (*DocumentDel) String

func (m *DocumentDel) String() string

func (*DocumentDel) Unmarshal

func (m *DocumentDel) Unmarshal(dAtA []byte) error

type DocumentWithIdx

type DocumentWithIdx struct {
	Doc              Document `protobuf:"bytes,1,opt,name=doc" json:"doc"`
	Index            string   `protobuf:"bytes,2,opt,name=index" json:"index"`
	XXX_unrecognized []byte   `json:"-"`
}

func (*DocumentWithIdx) Descriptor

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

func (*DocumentWithIdx) Marshal

func (m *DocumentWithIdx) Marshal() (dAtA []byte, err error)

func (*DocumentWithIdx) MarshalTo

func (m *DocumentWithIdx) MarshalTo(dAtA []byte) (int, error)

func (*DocumentWithIdx) ProtoMessage

func (*DocumentWithIdx) ProtoMessage()

func (*DocumentWithIdx) Reset

func (m *DocumentWithIdx) Reset()

func (*DocumentWithIdx) Size

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

func (*DocumentWithIdx) String

func (m *DocumentWithIdx) String() string

func (*DocumentWithIdx) Unmarshal

func (m *DocumentWithIdx) Unmarshal(dAtA []byte) error

type EnumPred

type EnumPred struct {
	Name   string
	InVals []int
}

type EnumProp

type EnumProp struct {
	Name             string `protobuf:"bytes,1,opt,name=name" json:"name"`
	Val              uint64 `protobuf:"varint,2,opt,name=val" json:"val"`
	XXX_unrecognized []byte `json:"-"`
}

func (*EnumProp) Descriptor

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

func (*EnumProp) Marshal

func (m *EnumProp) Marshal() (dAtA []byte, err error)

func (*EnumProp) MarshalTo

func (m *EnumProp) MarshalTo(dAtA []byte) (int, error)

func (*EnumProp) ProtoMessage

func (*EnumProp) ProtoMessage()

func (*EnumProp) Reset

func (m *EnumProp) Reset()

func (*EnumProp) Size

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

func (*EnumProp) String

func (m *EnumProp) String() string

func (*EnumProp) Unmarshal

func (m *EnumProp) Unmarshal(dAtA []byte) error

type StrPred

type StrPred struct {
	Name     string
	ContWord string
}

type StrProp

type StrProp struct {
	Name             string `protobuf:"bytes,1,opt,name=name" json:"name"`
	Val              string `protobuf:"bytes,2,opt,name=val" json:"val"`
	XXX_unrecognized []byte `json:"-"`
}

func (*StrProp) Descriptor

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

func (*StrProp) Marshal

func (m *StrProp) Marshal() (dAtA []byte, err error)

func (*StrProp) MarshalTo

func (m *StrProp) MarshalTo(dAtA []byte) (int, error)

func (*StrProp) ProtoMessage

func (*StrProp) ProtoMessage()

func (*StrProp) Reset

func (m *StrProp) Reset()

func (*StrProp) Size

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

func (*StrProp) String

func (m *StrProp) String() string

func (*StrProp) Unmarshal

func (m *StrProp) Unmarshal(dAtA []byte) error

type UintPred

type UintPred struct {
	Name      string
	Low, High uint64
}

type UintProp

type UintProp struct {
	Name             string `protobuf:"bytes,1,opt,name=name" json:"name"`
	IsFloat          bool   `protobuf:"varint,2,opt,name=isFloat" json:"isFloat"`
	ValLen           int32  `protobuf:"varint,3,opt,name=valLen" json:"valLen"`
	Val              uint64 `protobuf:"varint,4,opt,name=val" json:"val"`
	XXX_unrecognized []byte `json:"-"`
}

func (*UintProp) Descriptor

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

func (*UintProp) Marshal

func (m *UintProp) Marshal() (dAtA []byte, err error)

func (*UintProp) MarshalTo

func (m *UintProp) MarshalTo(dAtA []byte) (int, error)

func (*UintProp) ProtoMessage

func (*UintProp) ProtoMessage()

func (*UintProp) Reset

func (m *UintProp) Reset()

func (*UintProp) Size

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

func (*UintProp) String

func (m *UintProp) String() string

func (*UintProp) Unmarshal

func (m *UintProp) Unmarshal(dAtA []byte) error

type VerboseErrorListener

type VerboseErrorListener struct {
	antlr.DefaultErrorListener
	// contains filtered or unexported fields
}

func (*VerboseErrorListener) ReportAmbiguity

func (el *VerboseErrorListener) ReportAmbiguity(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex int, exact bool, ambigAlts *antlr.BitSet, configs antlr.ATNConfigSet)

func (*VerboseErrorListener) ReportAttemptingFullContext

func (el *VerboseErrorListener) ReportAttemptingFullContext(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex int, conflictingAlts *antlr.BitSet, configs antlr.ATNConfigSet)

func (*VerboseErrorListener) ReportContextSensitivity

func (el *VerboseErrorListener) ReportContextSensitivity(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex, prediction int, configs antlr.ATNConfigSet)

func (*VerboseErrorListener) SyntaxError

func (el *VerboseErrorListener) SyntaxError(recognizer antlr.Recognizer, offendingSymbol interface{}, line, column int, msg string, e antlr.RecognitionException)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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