v1

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 27 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MessageOptions_Index_IndexMethod_name = map[int32]string{
		0: "INDEX_METHOD_UNSPECIFIED",
		1: "INDEX_METHOD_BTREE",
		2: "INDEX_METHOD_GIN",
		3: "INDEX_METHOD_BTREE_GIN",
		4: "INDEX_METHOD_HNSW_COSINE",
	}
	MessageOptions_Index_IndexMethod_value = map[string]int32{
		"INDEX_METHOD_UNSPECIFIED": 0,
		"INDEX_METHOD_BTREE":       1,
		"INDEX_METHOD_GIN":         2,
		"INDEX_METHOD_BTREE_GIN":   3,
		"INDEX_METHOD_HNSW_COSINE": 4,
	}
)

Enum value maps for MessageOptions_Index_IndexMethod.

View Source
var (
	MessageOptions_Stat_StatsKind_name = map[int32]string{
		0: "STATS_KIND_UNSPECIFIED",
		1: "STATS_KIND_NDISTINCT",
		2: "STATS_KIND_DEPENDENCIES",
		3: "STATS_KIND_MCV",
	}
	MessageOptions_Stat_StatsKind_value = map[string]int32{
		"STATS_KIND_UNSPECIFIED":  0,
		"STATS_KIND_NDISTINCT":    1,
		"STATS_KIND_DEPENDENCIES": 2,
		"STATS_KIND_MCV":          3,
	}
)

Enum value maps for MessageOptions_Stat_StatsKind.

View Source
var (
	FieldOptions_FullTextType_name = map[int32]string{
		0: "FULL_TEXT_TYPE_UNSPECIFIED",
		1: "FULL_TEXT_TYPE_EXACT",
		2: "FULL_TEXT_TYPE_ENGLISH",
		3: "FULL_TEXT_TYPE_ENGLISH_LONG",
	}
	FieldOptions_FullTextType_value = map[string]int32{
		"FULL_TEXT_TYPE_UNSPECIFIED":  0,
		"FULL_TEXT_TYPE_EXACT":        1,
		"FULL_TEXT_TYPE_ENGLISH":      2,
		"FULL_TEXT_TYPE_ENGLISH_LONG": 3,
	}
)

Enum value maps for FieldOptions_FullTextType.

View Source
var (
	FieldOptions_FullTextWeight_name = map[int32]string{
		0: "FULL_TEXT_WEIGHT_UNSPECIFIED",
		1: "FULL_TEXT_WEIGHT_LOW",
		2: "FULL_TEXT_WEIGHT_MED",
		3: "FULL_TEXT_WEIGHT_HIGH",
	}
	FieldOptions_FullTextWeight_value = map[string]int32{
		"FULL_TEXT_WEIGHT_UNSPECIFIED": 0,
		"FULL_TEXT_WEIGHT_LOW":         1,
		"FULL_TEXT_WEIGHT_MED":         2,
		"FULL_TEXT_WEIGHT_HIGH":        3,
	}
)

Enum value maps for FieldOptions_FullTextWeight.

View Source
var (
	FieldOptions_MessageBehavior_name = map[int32]string{
		0: "MESSAGE_BEHAVIOR_UNSPECIFIED",
		1: "MESSAGE_BEHAVIOR_EXPAND",
		2: "MESSAGE_BEHAVIOR_OMIT",
		3: "MESSAGE_BEHAVIOR_JSONB",
		4: "MESSAGE_BEHAVIOR_VECTOR",
		5: "MESSAGE_BEHAVIOR_INET_ADDR",
	}
	FieldOptions_MessageBehavior_value = map[string]int32{
		"MESSAGE_BEHAVIOR_UNSPECIFIED": 0,
		"MESSAGE_BEHAVIOR_EXPAND":      1,
		"MESSAGE_BEHAVIOR_OMIT":        2,
		"MESSAGE_BEHAVIOR_JSONB":       3,
		"MESSAGE_BEHAVIOR_VECTOR":      4,
		"MESSAGE_BEHAVIOR_INET_ADDR":   5,
	}
)

Enum value maps for FieldOptions_MessageBehavior.

View Source
var (
	// optional pgdb.v1.EnumValueOptions enum = 6010;
	E_Enum = &file_pgdb_v1_pgdb_proto_extTypes[2]
)

Extension fields to descriptorpb.EnumValueOptions.

View Source
var (
	// optional pgdb.v1.MessageOptions msg = 6010;
	E_Msg = &file_pgdb_v1_pgdb_proto_extTypes[0]
)

Extension fields to descriptorpb.MessageOptions.

View Source
var (
	// optional pgdb.v1.FieldOptions options = 6010;
	E_Options = &file_pgdb_v1_pgdb_proto_extTypes[1]
)

Extension fields to descriptorpb.FieldOptions.

View Source
var File_pgdb_v1_pgdb_proto protoreflect.FileDescriptor

Functions

func CreateSchema

func CreateSchema(msg DBReflectMessage) ([]string, error)

func Delete added in v0.1.11

func Delete(msg DBReflectMessage) (string, []any, error)

func FloatToVector added in v0.3.9

func FloatToVector(in []float32) exp.LiteralExpression

In order to insert a vector type it needs to be of the form '[1.0,2.0,3.0,...]'.

func FullTextSearchQuery

func FullTextSearchQuery(input string, additionalFilters ...jargon.Filter) exp.Expression

func FullTextSearchVectors

func FullTextSearchVectors(docs []*SearchContent, additionalFilters ...jargon.Filter) exp.Expression

FullTextSearchVectors converts a set of input documents into a ::tsvector. Note: this function may generally ignore errors in input text, to be robust to untrusted inputs, and will do its "best", for some value of "best".

func IndexSchema

func IndexSchema(msg DBReflectMessage) ([]string, error)

func Insert

func Insert(msg DBReflectMessage) (string, []any, error)

func MarshalNestedRecord

func MarshalNestedRecord(msg DBReflectMessage, opts ...RecordOptionsFunc) (exp.Record, error)

func Migrations

func Migrations(ctx context.Context, db sqlScanner, msg DBReflectMessage) ([]string, error)

func TenantPartitionsUpdate added in v0.3.8

func TenantPartitionsUpdate(ctx context.Context, db sqlScanner, msg DBReflectMessage, iteratorFunc TenantIteratorFunc, updateFunc SchemaUpdateFunc) error

Types

type Column

type Column struct {
	Table              string
	Name               string
	Type               string
	Nullable           bool
	OverrideExpression string
	Default            string
}

func (*Column) Identifier added in v0.1.17

func (x *Column) Identifier() exp.IdentifierExpression

type ColumnExpression added in v0.1.17

type ColumnExpression interface {
	Identifier() exp.IdentifierExpression
}

type DBReflectMessage

type DBReflectMessage interface {
	DBReflect() Message
}

type Descriptor

type Descriptor interface {
	TableName() string

	Fields(opts ...DescriptorFieldOptionFunc) []*Column

	PKSKField() *Column
	DataField() *Column
	SearchField() *Column
	VersioningField() *Column
	TenantField() *Column
	IsPartitioned() bool

	Indexes(opts ...IndexOptionsFunc) []*Index
	IndexPrimaryKey(opts ...IndexOptionsFunc) *Index

	Statistics(opts ...StatisticOptionsFunc) []*Statistic
}

Descriptor is the same for all instances of a Message.

type DescriptorFieldOption

type DescriptorFieldOption struct {
	Prefix        string
	IsNested      bool
	IsPartitioned bool
}

func NewDescriptorFieldOption

func NewDescriptorFieldOption(opts []DescriptorFieldOptionFunc) *DescriptorFieldOption

func (*DescriptorFieldOption) ColumnName

func (r *DescriptorFieldOption) ColumnName(in string) string

func (*DescriptorFieldOption) Nested

func (DescriptorFieldOption) Nullable added in v0.1.14

func (dfo DescriptorFieldOption) Nullable(defaultValue bool) bool

type DescriptorFieldOptionFunc

type DescriptorFieldOptionFunc func(option *DescriptorFieldOption)

func DescriptorFieldNested added in v0.1.7

func DescriptorFieldNested(b bool) DescriptorFieldOptionFunc

func DescriptorFieldPrefix

func DescriptorFieldPrefix(prefix string) DescriptorFieldOptionFunc

type EnumValueOptions added in v0.3.11

type EnumValueOptions struct {

	// vector size options
	VectorSize int32 `protobuf:"varint,1,opt,name=vector_size,json=vectorSize,proto3" json:"vector_size,omitempty"`
	// contains filtered or unexported fields
}

func (*EnumValueOptions) Descriptor deprecated added in v0.3.11

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

Deprecated: Use EnumValueOptions.ProtoReflect.Descriptor instead.

func (*EnumValueOptions) GetVectorSize added in v0.3.11

func (x *EnumValueOptions) GetVectorSize() int32

func (*EnumValueOptions) ProtoMessage added in v0.3.11

func (*EnumValueOptions) ProtoMessage()

func (*EnumValueOptions) ProtoReflect added in v0.3.11

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

func (*EnumValueOptions) Reset added in v0.3.11

func (x *EnumValueOptions) Reset()

func (*EnumValueOptions) String added in v0.3.11

func (x *EnumValueOptions) String() string

type FieldOptions

type FieldOptions struct {
	FullTextType    FieldOptions_FullTextType    `` /* 139-byte string literal not displayed */
	FullTextWeight  FieldOptions_FullTextWeight  `` /* 147-byte string literal not displayed */
	MessageBehavior FieldOptions_MessageBehavior `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*FieldOptions) Descriptor deprecated

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

Deprecated: Use FieldOptions.ProtoReflect.Descriptor instead.

func (*FieldOptions) GetFullTextType

func (x *FieldOptions) GetFullTextType() FieldOptions_FullTextType

func (*FieldOptions) GetFullTextWeight

func (x *FieldOptions) GetFullTextWeight() FieldOptions_FullTextWeight

func (*FieldOptions) GetMessageBehavior added in v0.4.1

func (x *FieldOptions) GetMessageBehavior() FieldOptions_MessageBehavior

func (*FieldOptions) ProtoMessage

func (*FieldOptions) ProtoMessage()

func (*FieldOptions) ProtoReflect

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

func (*FieldOptions) Reset

func (x *FieldOptions) Reset()

func (*FieldOptions) String

func (x *FieldOptions) String() string

type FieldOptions_FullTextType

type FieldOptions_FullTextType int32
const (
	FieldOptions_FULL_TEXT_TYPE_UNSPECIFIED FieldOptions_FullTextType = 0
	FieldOptions_FULL_TEXT_TYPE_EXACT       FieldOptions_FullTextType = 1
	// Best used for short display names
	FieldOptions_FULL_TEXT_TYPE_ENGLISH FieldOptions_FullTextType = 2
	// Removes short-tokens (<3 chars), useful for descirptions
	FieldOptions_FULL_TEXT_TYPE_ENGLISH_LONG FieldOptions_FullTextType = 3
)

func (FieldOptions_FullTextType) Descriptor

func (FieldOptions_FullTextType) Enum

func (FieldOptions_FullTextType) EnumDescriptor deprecated

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

Deprecated: Use FieldOptions_FullTextType.Descriptor instead.

func (FieldOptions_FullTextType) Number

func (FieldOptions_FullTextType) String

func (x FieldOptions_FullTextType) String() string

func (FieldOptions_FullTextType) Type

type FieldOptions_FullTextWeight

type FieldOptions_FullTextWeight int32
const (
	FieldOptions_FULL_TEXT_WEIGHT_UNSPECIFIED FieldOptions_FullTextWeight = 0
	FieldOptions_FULL_TEXT_WEIGHT_LOW         FieldOptions_FullTextWeight = 1
	FieldOptions_FULL_TEXT_WEIGHT_MED         FieldOptions_FullTextWeight = 2
	FieldOptions_FULL_TEXT_WEIGHT_HIGH        FieldOptions_FullTextWeight = 3
)

func (FieldOptions_FullTextWeight) Descriptor

func (FieldOptions_FullTextWeight) Enum

func (FieldOptions_FullTextWeight) EnumDescriptor deprecated

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

Deprecated: Use FieldOptions_FullTextWeight.Descriptor instead.

func (FieldOptions_FullTextWeight) Number

func (FieldOptions_FullTextWeight) String

func (FieldOptions_FullTextWeight) Type

type FieldOptions_MessageBehavior added in v0.4.0

type FieldOptions_MessageBehavior int32
const (
	FieldOptions_MESSAGE_BEHAVIOR_UNSPECIFIED FieldOptions_MessageBehavior = 0
	FieldOptions_MESSAGE_BEHAVIOR_EXPAND      FieldOptions_MessageBehavior = 1
	FieldOptions_MESSAGE_BEHAVIOR_OMIT        FieldOptions_MessageBehavior = 2
	FieldOptions_MESSAGE_BEHAVIOR_JSONB       FieldOptions_MessageBehavior = 3
	// Must be a repeated sub-Message which contains a model id and a repeated float vector.
	FieldOptions_MESSAGE_BEHAVIOR_VECTOR FieldOptions_MessageBehavior = 4
	// Must be a string representation of an IP address.
	FieldOptions_MESSAGE_BEHAVIOR_INET_ADDR FieldOptions_MessageBehavior = 5
)

func (FieldOptions_MessageBehavior) Descriptor added in v0.4.0

func (FieldOptions_MessageBehavior) Enum added in v0.4.0

func (FieldOptions_MessageBehavior) EnumDescriptor deprecated added in v0.4.0

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

Deprecated: Use FieldOptions_MessageBehavior.Descriptor instead.

func (FieldOptions_MessageBehavior) Number added in v0.4.0

func (FieldOptions_MessageBehavior) String added in v0.4.0

func (FieldOptions_MessageBehavior) Type added in v0.4.0

type Index

type Index struct {
	Name string
	// only one index can be set to IsPrimary
	IsPrimary bool
	IsUnique  bool
	// this indivates the Index by this name MAY be dropped, once in IsDropped state, other fields may be empty.
	IsDropped bool
	Method    MessageOptions_Index_IndexMethod
	Columns   []string
	// OverrideExpression if set, this string is used to render indexes contents, instead of the Columns list.
	OverrideExpression string
	WherePredicate     string
}

type IndexOption

type IndexOption struct {
	IndexPrefix  string
	ColumnPrefix string
	IsNested     bool
}

func NewIndexOptions

func NewIndexOptions(opts []IndexOptionsFunc) *IndexOption

func (*IndexOption) ColumnName

func (r *IndexOption) ColumnName(in string) string

func (*IndexOption) IndexName

func (r *IndexOption) IndexName(in string) string

func (*IndexOption) Nested

func (r *IndexOption) Nested(prefix string) []IndexOptionsFunc

type IndexOptionsFunc

type IndexOptionsFunc func(option *IndexOption)

func IndexOptionColumnPrefix

func IndexOptionColumnPrefix(prefix string) IndexOptionsFunc

func IndexOptionIndexPrefix

func IndexOptionIndexPrefix(prefix string) IndexOptionsFunc

func IndexOptionIsNested added in v0.1.7

func IndexOptionIsNested(b bool) IndexOptionsFunc

type Message

type Message interface {
	Descriptor() Descriptor

	Record(opts ...RecordOptionsFunc) (exp.Record, error)
	SearchData(opts ...RecordOptionsFunc) []*SearchContent
}

type MessageOptions

type MessageOptions struct {
	Disabled bool                    `protobuf:"varint,1,opt,name=disabled,proto3" json:"disabled,omitempty"`
	Indexes  []*MessageOptions_Index `protobuf:"bytes,2,rep,name=indexes,proto3" json:"indexes,omitempty"`
	// defaults to `tenant_id`.  Must be set if an object does not have a
	// `tenant_id` field.
	TenantIdField string `protobuf:"bytes,3,opt,name=tenant_id_field,json=tenantIdField,proto3" json:"tenant_id_field,omitempty"`
	// if this message is only used in nested messages, a subset of methods
	// will be generated.
	NestedOnly bool `protobuf:"varint,4,opt,name=nested_only,json=nestedOnly,proto3" json:"nested_only,omitempty"`
	// if this message is used then we create a partitioned table and partition by
	// tenant_id.
	Partitioned bool                   `protobuf:"varint,5,opt,name=partitioned,proto3" json:"partitioned,omitempty"`
	Stats       []*MessageOptions_Stat `protobuf:"bytes,6,rep,name=stats,proto3" json:"stats,omitempty"`
	// contains filtered or unexported fields
}

func (*MessageOptions) Descriptor deprecated

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

Deprecated: Use MessageOptions.ProtoReflect.Descriptor instead.

func (*MessageOptions) GetDisabled

func (x *MessageOptions) GetDisabled() bool

func (*MessageOptions) GetIndexes

func (x *MessageOptions) GetIndexes() []*MessageOptions_Index

func (*MessageOptions) GetNestedOnly

func (x *MessageOptions) GetNestedOnly() bool

func (*MessageOptions) GetPartitioned added in v0.3.8

func (x *MessageOptions) GetPartitioned() bool

func (*MessageOptions) GetStats added in v0.3.12

func (x *MessageOptions) GetStats() []*MessageOptions_Stat

func (*MessageOptions) GetTenantIdField

func (x *MessageOptions) GetTenantIdField() string

func (*MessageOptions) ProtoMessage

func (*MessageOptions) ProtoMessage()

func (*MessageOptions) ProtoReflect

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

func (*MessageOptions) Reset

func (x *MessageOptions) Reset()

func (*MessageOptions) String

func (x *MessageOptions) String() string

type MessageOptions_Index

type MessageOptions_Index struct {
	Name    string                           `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Method  MessageOptions_Index_IndexMethod `protobuf:"varint,2,opt,name=method,proto3,enum=pgdb.v1.MessageOptions_Index_IndexMethod" json:"method,omitempty"`
	Columns []string                         `protobuf:"bytes,3,rep,name=columns,proto3" json:"columns,omitempty"`
	// used to indicate the index by this name can be dropped
	Dropped bool `protobuf:"varint,4,opt,name=dropped,proto3" json:"dropped,omitempty"`
	// contains filtered or unexported fields
}

func (*MessageOptions_Index) Descriptor deprecated

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

Deprecated: Use MessageOptions_Index.ProtoReflect.Descriptor instead.

func (*MessageOptions_Index) GetColumns

func (x *MessageOptions_Index) GetColumns() []string

func (*MessageOptions_Index) GetDropped

func (x *MessageOptions_Index) GetDropped() bool

func (*MessageOptions_Index) GetMethod added in v0.2.0

func (*MessageOptions_Index) GetName

func (x *MessageOptions_Index) GetName() string

func (*MessageOptions_Index) ProtoMessage

func (*MessageOptions_Index) ProtoMessage()

func (*MessageOptions_Index) ProtoReflect

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

func (*MessageOptions_Index) Reset

func (x *MessageOptions_Index) Reset()

func (*MessageOptions_Index) String

func (x *MessageOptions_Index) String() string

type MessageOptions_Index_IndexMethod

type MessageOptions_Index_IndexMethod int32
const (
	MessageOptions_Index_INDEX_METHOD_UNSPECIFIED MessageOptions_Index_IndexMethod = 0
	MessageOptions_Index_INDEX_METHOD_BTREE       MessageOptions_Index_IndexMethod = 1
	MessageOptions_Index_INDEX_METHOD_GIN         MessageOptions_Index_IndexMethod = 2
	// Requires loading of BTREE_GIN extension:
	// https://www.postgresql.org/docs/current/btree-gin.html
	MessageOptions_Index_INDEX_METHOD_BTREE_GIN   MessageOptions_Index_IndexMethod = 3
	MessageOptions_Index_INDEX_METHOD_HNSW_COSINE MessageOptions_Index_IndexMethod = 4
)

func (MessageOptions_Index_IndexMethod) Descriptor

func (MessageOptions_Index_IndexMethod) Enum

func (MessageOptions_Index_IndexMethod) EnumDescriptor deprecated

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

Deprecated: Use MessageOptions_Index_IndexMethod.Descriptor instead.

func (MessageOptions_Index_IndexMethod) Number

func (MessageOptions_Index_IndexMethod) String

func (MessageOptions_Index_IndexMethod) Type

type MessageOptions_Stat added in v0.3.12

type MessageOptions_Stat struct {
	Name    string                          `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Kinds   []MessageOptions_Stat_StatsKind `protobuf:"varint,2,rep,packed,name=kinds,proto3,enum=pgdb.v1.MessageOptions_Stat_StatsKind" json:"kinds,omitempty"`
	Columns []string                        `protobuf:"bytes,3,rep,name=columns,proto3" json:"columns,omitempty"`
	// used to indicate the stats by this name can be dropped
	Dropped bool `protobuf:"varint,4,opt,name=dropped,proto3" json:"dropped,omitempty"`
	// contains filtered or unexported fields
}

func (*MessageOptions_Stat) Descriptor deprecated added in v0.3.12

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

Deprecated: Use MessageOptions_Stat.ProtoReflect.Descriptor instead.

func (*MessageOptions_Stat) GetColumns added in v0.3.12

func (x *MessageOptions_Stat) GetColumns() []string

func (*MessageOptions_Stat) GetDropped added in v0.3.12

func (x *MessageOptions_Stat) GetDropped() bool

func (*MessageOptions_Stat) GetKinds added in v0.3.12

func (*MessageOptions_Stat) GetName added in v0.3.12

func (x *MessageOptions_Stat) GetName() string

func (*MessageOptions_Stat) ProtoMessage added in v0.3.12

func (*MessageOptions_Stat) ProtoMessage()

func (*MessageOptions_Stat) ProtoReflect added in v0.3.12

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

func (*MessageOptions_Stat) Reset added in v0.3.12

func (x *MessageOptions_Stat) Reset()

func (*MessageOptions_Stat) String added in v0.3.12

func (x *MessageOptions_Stat) String() string

type MessageOptions_Stat_StatsKind added in v0.3.12

type MessageOptions_Stat_StatsKind int32
const (
	MessageOptions_Stat_STATS_KIND_UNSPECIFIED  MessageOptions_Stat_StatsKind = 0
	MessageOptions_Stat_STATS_KIND_NDISTINCT    MessageOptions_Stat_StatsKind = 1
	MessageOptions_Stat_STATS_KIND_DEPENDENCIES MessageOptions_Stat_StatsKind = 2
	MessageOptions_Stat_STATS_KIND_MCV          MessageOptions_Stat_StatsKind = 3
)

func (MessageOptions_Stat_StatsKind) Descriptor added in v0.3.12

func (MessageOptions_Stat_StatsKind) Enum added in v0.3.12

func (MessageOptions_Stat_StatsKind) EnumDescriptor deprecated added in v0.3.12

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

Deprecated: Use MessageOptions_Stat_StatsKind.Descriptor instead.

func (MessageOptions_Stat_StatsKind) Number added in v0.3.12

func (MessageOptions_Stat_StatsKind) String added in v0.3.12

func (MessageOptions_Stat_StatsKind) Type added in v0.3.12

type QueryOptions

type QueryOptions interface{}

TODO(pquerna): add options builder

type RecordOption

type RecordOption struct {
	Prefix   string
	IsNested bool
	Nulled   bool
}

func NewRecordOptions

func NewRecordOptions(opts []RecordOptionsFunc) *RecordOption

func (*RecordOption) ColumnName

func (r *RecordOption) ColumnName(in string) string

func (*RecordOption) Nested

func (r *RecordOption) Nested(prefix string) []RecordOptionsFunc

type RecordOptionsFunc

type RecordOptionsFunc func(option *RecordOption)

func RecordOptionIsNested added in v0.1.7

func RecordOptionIsNested(b bool) RecordOptionsFunc

func RecordOptionNulled added in v0.1.14

func RecordOptionNulled(b bool) RecordOptionsFunc

func RecordOptionPrefix

func RecordOptionPrefix(prefix string) RecordOptionsFunc

type SchemaUpdateFunc added in v0.3.8

type SchemaUpdateFunc func(ctx context.Context, schema string, args ...interface{}) error

type SearchContent

type SearchContent struct {
	Type   FieldOptions_FullTextType
	Weight FieldOptions_FullTextWeight
	Value  interface{}
}

type Statistic added in v0.3.12

type Statistic struct {
	Name string
	// this indivates the Stats by this name MAY be dropped, once in IsDropped state, other fields may be empty.
	IsDropped bool
	Kinds     []MessageOptions_Stat_StatsKind
	Columns   []string
}

type StatisticOption added in v0.3.12

type StatisticOption struct {
	StatsPrefix  string
	ColumnPrefix string
	IsNested     bool
}

func NewStatisticOption added in v0.3.12

func NewStatisticOption(opts []StatisticOptionsFunc) *StatisticOption

func (*StatisticOption) ColumnName added in v0.3.12

func (r *StatisticOption) ColumnName(in string) string

func (*StatisticOption) Nested added in v0.3.12

func (r *StatisticOption) Nested(prefix string) []StatisticOptionsFunc

func (*StatisticOption) StatsName added in v0.3.12

func (r *StatisticOption) StatsName(in string) string

type StatisticOptionsFunc added in v0.3.12

type StatisticOptionsFunc func(option *StatisticOption)

func StatsOptionColumnPrefix added in v0.3.12

func StatsOptionColumnPrefix(prefix string) StatisticOptionsFunc

func StatsOptionIsNested added in v0.3.12

func StatsOptionIsNested(b bool) StatisticOptionsFunc

func StatsOptionStatsPrefix added in v0.3.12

func StatsOptionStatsPrefix(prefix string) StatisticOptionsFunc

type TenantIteratorFunc added in v0.3.8

type TenantIteratorFunc func(ctx context.Context) (string, error)

This will be passed in in C1.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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