Documentation
¶
Index ¶
- Constants
- func NewError(text string, code int) error
- func RegisterBinding(name string, binding RawBinding)
- type Error
- type IndexOptions
- func (indexOpts *IndexOptions) Appendable(value bool) *IndexOptions
- func (indexOpts *IndexOptions) Array(value bool) *IndexOptions
- func (indexOpts *IndexOptions) Dense(value bool) *IndexOptions
- func (indexOpts *IndexOptions) IsAppendable() bool
- func (indexOpts *IndexOptions) IsArray() bool
- func (indexOpts *IndexOptions) IsDense() bool
- func (indexOpts *IndexOptions) IsPK() bool
- func (indexOpts *IndexOptions) PK(value bool) *IndexOptions
- type Logger
- type RawBinding
- type RawBuffer
- type Stats
- type StorageOptions
Constants ¶
View Source
const ( EQ = int(C.CondEq) GT = int(C.CondGt) LT = int(C.CondLt) GE = int(C.CondGe) LE = int(C.CondLe) SET = int(C.CondSet) ALLSET = int(C.CondAllSet) RANGE = int(C.CondRange) ANY = int(C.CondAny) EMPTY = int(C.CondEmpty) ERROR = int(C.LogError) WARNING = int(C.LogWarning) INFO = int(C.LogInfo) TRACE = int(C.LogTrace) AggAvg = int(C.AggAvg) AggSum = int(C.AggSum) CollateNone = int(C.CollateNone) CollateASCII = int(C.CollateASCII) CollateUTF8 = int(C.CollateUTF8) CollateNumeric = int(C.CollateNumeric) )
public go consts from type_consts.h and reindexer_ctypes.h
View Source
const ( OpAnd = int(C.OpAnd) OpOr = int(C.OpOr) OpNot = int(C.OpNot) ValueInt = int(C.KeyValueInt) ValueInt64 = int(C.KeyValueInt64) ValueDouble = int(C.KeyValueDouble) ValueString = int(C.KeyValueString) QueryCondition = int(C.QueryCondition) QueryDistinct = int(C.QueryDistinct) QuerySortIndex = int(C.QuerySortIndex) QueryJoinOn = int(C.QueryJoinOn) QueryEnd = int(C.QueryEnd) QueryLimit = int(C.QueryLimit) QueryOffset = int(C.QueryOffset) QueryDebugLevel = int(C.QueryDebugLevel) QueryReqTotal = int(C.QueryReqTotal) QuerySelectFilter = int(C.QuerySelectFilter) QueryAggregation = int(C.QueryAggregation) LeftJoin = int(C.LeftJoin) InnerJoin = int(C.InnerJoin) OrInnerJoin = int(C.OrInnerJoin) Merge = int(C.Merge) TAG_VARINT = int(C.TAG_VARINT) TAG_DOUBLE = int(C.TAG_DOUBLE) TAG_STRING = int(C.TAG_STRING) TAG_ARRAY = int(C.TAG_ARRAY) TAG_BOOL = int(C.TAG_BOOL) TAG_NULL = int(C.TAG_NULL) TAG_OBJECT = int(C.TAG_OBJECT) TAG_END = int(C.TAG_END) FormatJson = int(C.FormatJson) FormatCJson = int(C.FormatCJson) ModeInsert = int(C.ModeInsert) ModeUpdate = int(C.ModeUpdate) ModeUpsert = int(C.ModeUpsert) ModeDelete = int(C.ModeDelete) ModeNoCalc = int(C.ModeNoTotal) ModeCachedTotal = int(C.ModeCachedTotal) ModeAccurateTotal = int(C.ModeAccurateTotal) ResultsPure = int(C.kResultsPure) ResultsWithPtrs = int(C.kResultsWithPtrs) ResultsWithCJson = int(C.kResultsWithCJson) ResultsWithJson = int(C.kResultsWithJson) ResultsWithPayloadTypes = int(C.kResultsWithPayloadTypes) ResultsClose = int(C.kResultsClose) IndexOptPK = uint8(C.kIndexOptPK) IndexOptArray = uint8(C.kIndexOptArray) IndexOptDense = uint8(C.kIndexOptDense) IndexOptAppendable = uint8(C.kIndexOptAppendable) StorageOptEnabled = uint8(C.kStorageOptEnabled) StorageOptDropOnFileFormatError = uint8(C.kStorageOptDropOnFileFormatError) ErrOK = int(C.errOK) ErrParseSQL = int(C.errParseSQL) ErrQueryExec = int(C.errQueryExec) ErrParams = int(C.errParams) ErrLogic = int(C.errLogic) ErrParseJson = int(C.errParseJson) ErrParseDSL = int(C.errParseDSL) ErrConflict = int(C.errConflict) )
private go consts from type_consts.h and reindexer_ctypes.h
View Source
const CInt32Max = int(^uint32(0) >> 1)
Variables ¶
This section is empty.
Functions ¶
func RegisterBinding ¶
func RegisterBinding(name string, binding RawBinding)
Types ¶
type IndexOptions ¶
type IndexOptions uint8
func (*IndexOptions) Appendable ¶
func (indexOpts *IndexOptions) Appendable(value bool) *IndexOptions
func (*IndexOptions) Array ¶
func (indexOpts *IndexOptions) Array(value bool) *IndexOptions
func (*IndexOptions) Dense ¶
func (indexOpts *IndexOptions) Dense(value bool) *IndexOptions
func (*IndexOptions) IsAppendable ¶
func (indexOpts *IndexOptions) IsAppendable() bool
func (*IndexOptions) IsArray ¶
func (indexOpts *IndexOptions) IsArray() bool
func (*IndexOptions) IsDense ¶
func (indexOpts *IndexOptions) IsDense() bool
func (*IndexOptions) IsPK ¶
func (indexOpts *IndexOptions) IsPK() bool
func (*IndexOptions) PK ¶
func (indexOpts *IndexOptions) PK(value bool) *IndexOptions
type RawBinding ¶
type RawBinding interface { Init(u *url.URL) error OpenNamespace(namespace string, enableStorage, dropOnFileFormatError bool) error CloseNamespace(namespace string) error DropNamespace(namespace string) error CloneNamespace(src string, dst string) error RenameNamespace(src string, dst string) error EnableStorage(namespace string) error AddIndex(namespace, index, jsonPath, indexType, fieldType string, opts IndexOptions, collateMode int) error ConfigureIndex(namespace, index, config string) error PutMeta(namespace, key, data string) error GetMeta(namespace, key string) (RawBuffer, error) ModifyItem(data []byte, mode int) (RawBuffer, error) Select(query string, withItems bool, ptVersions []int32) (RawBuffer, error) SelectQuery(rawQuery []byte, withItems bool, ptVersions []int32) (RawBuffer, error) DeleteQuery(rawQuery []byte) (RawBuffer, error) Commit(namespace string) error EnableLogger(logger Logger) DisableLogger() Ping() error GetStats() Stats ResetStats() }
Raw binding to reindexer
func GetBinding ¶
func GetBinding(name string) RawBinding
type RawBuffer ¶
type RawBuffer interface { GetBuf() []byte Free() }
go interface to reindexer_c.h interface
type Stats ¶
type Stats struct { CountGetItem int TimeGetItem time.Duration CountSelect int TimeSelect time.Duration CountInsert int TimeInsert time.Duration CountUpdate int TimeUpdate time.Duration CountUpsert int TimeUpsert time.Duration CountDelete int TimeDelete time.Duration CountJoin int TimeJoin time.Duration }
type StorageOptions ¶
type StorageOptions uint8
func (*StorageOptions) DropOnFileFormatError ¶
func (so *StorageOptions) DropOnFileFormatError(value bool) *StorageOptions
func (*StorageOptions) Enabled ¶
func (so *StorageOptions) Enabled(value bool) *StorageOptions
Click to show internal directories.
Click to hide internal directories.