Documentation ¶
Index ¶
- func CheckFieldsEqual(fieldsA, fieldsB []*Field) bool
- func CheckPartitionsEqual(partitionsA, partitionsB []*Partition) bool
- func MarshalAliasModel(alias *Alias) *pb.AliasInfo
- func MarshalCollectionModel(coll *Collection) *pb.CollectionInfo
- func MarshalCollectionModelWithOption(coll *Collection, opts ...Option) *pb.CollectionInfo
- func MarshalCredentialModel(cred *Credential) *internalpb.CredentialInfo
- func MarshalDatabaseModel(db *Database) *pb.DatabaseInfo
- func MarshalFieldModel(field *Field) *schemapb.FieldSchema
- func MarshalFieldModels(fields []*Field) []*schemapb.FieldSchema
- func MarshalFunctionModel(function *Function) *schemapb.FunctionSchema
- func MarshalFunctionModels(functions []*Function) []*schemapb.FunctionSchema
- func MarshalIndexModel(index *Index) *indexpb.FieldIndex
- func MarshalPartitionModel(partition *Partition) *pb.PartitionInfo
- func MarshalSegmentIndexModel(segIdx *SegmentIndex) *indexpb.SegmentIndex
- type Alias
- type Collection
- type CollectionLoadInfo
- type Credential
- type Database
- type Field
- type Function
- type Index
- type Option
- type Partition
- type PartitionLoadInfo
- type Segment
- type SegmentIndex
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckFieldsEqual ¶
func CheckPartitionsEqual ¶
func MarshalAliasModel ¶
func MarshalCollectionModel ¶
func MarshalCollectionModel(coll *Collection) *pb.CollectionInfo
MarshalCollectionModel marshal only collection-related information. partitions, aliases and fields won't be marshaled. They should be written to newly path.
func MarshalCollectionModelWithOption ¶
func MarshalCollectionModelWithOption(coll *Collection, opts ...Option) *pb.CollectionInfo
func MarshalCredentialModel ¶
func MarshalCredentialModel(cred *Credential) *internalpb.CredentialInfo
func MarshalDatabaseModel ¶
func MarshalDatabaseModel(db *Database) *pb.DatabaseInfo
func MarshalFieldModel ¶
func MarshalFieldModel(field *Field) *schemapb.FieldSchema
func MarshalFieldModels ¶
func MarshalFieldModels(fields []*Field) []*schemapb.FieldSchema
func MarshalFunctionModel ¶
func MarshalFunctionModel(function *Function) *schemapb.FunctionSchema
func MarshalFunctionModels ¶
func MarshalFunctionModels(functions []*Function) []*schemapb.FunctionSchema
func MarshalIndexModel ¶
func MarshalIndexModel(index *Index) *indexpb.FieldIndex
func MarshalPartitionModel ¶
func MarshalPartitionModel(partition *Partition) *pb.PartitionInfo
func MarshalSegmentIndexModel ¶
func MarshalSegmentIndexModel(segIdx *SegmentIndex) *indexpb.SegmentIndex
Types ¶
type Alias ¶
type Alias struct { Name string CollectionID int64 CreatedTime uint64 State pb.AliasState DbID int64 }
func UnmarshalAliasModel ¶
type Collection ¶
type Collection struct { TenantID string DBID int64 CollectionID int64 Partitions []*Partition Name string Description string AutoID bool Fields []*Field Functions []*Function VirtualChannelNames []string PhysicalChannelNames []string ShardsNum int32 StartPositions []*commonpb.KeyDataPair CreateTime uint64 ConsistencyLevel commonpb.ConsistencyLevel Aliases []string // TODO: deprecate this. Properties []*commonpb.KeyValuePair State pb.CollectionState EnableDynamicField bool }
func UnmarshalCollectionModel ¶
func UnmarshalCollectionModel(coll *pb.CollectionInfo) *Collection
func (*Collection) Available ¶
func (c *Collection) Available() bool
func (*Collection) Clone ¶
func (c *Collection) Clone() *Collection
func (*Collection) Equal ¶
func (c *Collection) Equal(other Collection) bool
func (*Collection) GetPartitionNum ¶
func (c *Collection) GetPartitionNum(filterUnavailable bool) int
type CollectionLoadInfo ¶
type Credential ¶
type Database ¶
type Database struct { TenantID string ID int64 Name string State pb.DatabaseState CreatedTime uint64 Properties []*commonpb.KeyValuePair }
func NewDatabase ¶
func NewDatabase(id int64, name string, state pb.DatabaseState, properties []*commonpb.KeyValuePair) *Database
func NewDefaultDatabase ¶
func NewDefaultDatabase() *Database
func UnmarshalDatabaseModel ¶
func UnmarshalDatabaseModel(info *pb.DatabaseInfo) *Database
func (*Database) GetProperty ¶
type Field ¶
type Field struct { FieldID int64 Name string IsPrimaryKey bool Description string DataType schemapb.DataType TypeParams []*commonpb.KeyValuePair IndexParams []*commonpb.KeyValuePair AutoID bool State schemapb.FieldState IsDynamic bool IsPartitionKey bool // partition key mode, multi logic partitions share a physical partition IsClusteringKey bool IsFunctionOutput bool DefaultValue *schemapb.ValueField ElementType schemapb.DataType Nullable bool }
func CloneFields ¶
func UnmarshalFieldModel ¶
func UnmarshalFieldModel(fieldSchema *schemapb.FieldSchema) *Field
func UnmarshalFieldModels ¶
func UnmarshalFieldModels(fieldSchemas []*schemapb.FieldSchema) []*Field
type Function ¶
type Function struct { Name string ID int64 Description string Type schemapb.FunctionType InputFieldIDs []int64 InputFieldNames []string OutputFieldIDs []int64 OutputFieldNames []string Params []*commonpb.KeyValuePair }
func CloneFunctions ¶
func UnmarshalFunctionModel ¶
func UnmarshalFunctionModel(schema *schemapb.FunctionSchema) *Function
func UnmarshalFunctionModels ¶
func UnmarshalFunctionModels(functions []*schemapb.FunctionSchema) []*Function
type Index ¶
type Index struct { TenantID string CollectionID int64 FieldID int64 IndexID int64 IndexName string IsDeleted bool CreateTime uint64 TypeParams []*commonpb.KeyValuePair IndexParams []*commonpb.KeyValuePair IsAutoIndex bool UserIndexParams []*commonpb.KeyValuePair }
func CloneIndex ¶
func UnmarshalIndexModel ¶
func UnmarshalIndexModel(indexInfo *indexpb.FieldIndex) *Index
type Option ¶
type Option func(c *config)
func WithFields ¶
func WithFields() Option
func WithPartitions ¶
func WithPartitions() Option
type Partition ¶
type Partition struct { PartitionID int64 PartitionName string PartitionCreatedTimestamp uint64 Extra map[string]string // deprecated. CollectionID int64 State pb.PartitionState }
func ClonePartitions ¶
func UnmarshalPartitionModel ¶
func UnmarshalPartitionModel(info *pb.PartitionInfo) *Partition
type PartitionLoadInfo ¶
type SegmentIndex ¶
type SegmentIndex struct { SegmentID int64 CollectionID int64 PartitionID int64 NumRows int64 IndexID int64 BuildID int64 NodeID int64 IndexVersion int64 IndexState commonpb.IndexState FailReason string IsDeleted bool CreatedUTCTime uint64 IndexFileKeys []string IndexSize uint64 // deprecated WriteHandoff bool CurrentIndexVersion int32 IndexStoreVersion int64 }
func CloneSegmentIndex ¶
func CloneSegmentIndex(segIndex *SegmentIndex) *SegmentIndex
func UnmarshalSegmentIndexModel ¶
func UnmarshalSegmentIndexModel(segIndex *indexpb.SegmentIndex) *SegmentIndex
Click to show internal directories.
Click to hide internal directories.