Documentation
¶
Index ¶
- func CheckFieldsEqual(fieldsA, fieldsB []*Field) bool
- func CheckPartitionsEqual(partitionsA, partitionsB []*Partition) bool
- func CheckStructArrayFieldsEqual(structArrayFieldsA, structArrayFieldsB []*StructArrayField) 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
- func MarshalStructArrayFieldModel(structArrayField *StructArrayField) *schemapb.StructArrayFieldSchema
- func MarshalStructArrayFieldModels(fieldSchemas []*StructArrayField) []*schemapb.StructArrayFieldSchema
- type Alias
- type Collection
- func (c *Collection) ApplyUpdates(header *message.AlterCollectionMessageHeader, ...)
- func (c *Collection) Available() bool
- func (c *Collection) Clone() *Collection
- func (c *Collection) Equal(other Collection) bool
- func (c *Collection) GetPartitionNum(filterUnavailable bool) int
- func (c *Collection) ShallowClone() *Collection
- type CollectionLoadInfo
- type Credential
- type Database
- type Field
- type FileResource
- type Function
- type Index
- type Option
- type Partition
- type PartitionLoadInfo
- type Segment
- type SegmentIndex
- type StructArrayField
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckFieldsEqual ¶
func CheckPartitionsEqual ¶
func CheckStructArrayFieldsEqual ¶
func CheckStructArrayFieldsEqual(structArrayFieldsA, structArrayFieldsB []*StructArrayField) bool
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
func MarshalStructArrayFieldModel ¶
func MarshalStructArrayFieldModel(structArrayField *StructArrayField) *schemapb.StructArrayFieldSchema
func MarshalStructArrayFieldModels ¶
func MarshalStructArrayFieldModels(fieldSchemas []*StructArrayField) []*schemapb.StructArrayFieldSchema
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
DBName string
Description string
AutoID bool
Fields []*Field
StructArrayFields []*StructArrayField
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
UpdateTimestamp uint64
SchemaVersion int32
}
TODO: These collection is dirty implementation and easy to be broken, we should drop it in the future.
func UnmarshalCollectionModel ¶
func UnmarshalCollectionModel(coll *pb.CollectionInfo) *Collection
func (*Collection) ApplyUpdates ¶
func (c *Collection) ApplyUpdates(header *message.AlterCollectionMessageHeader, body *message.AlterCollectionMessageBody)
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
func (*Collection) ShallowClone ¶
func (c *Collection) ShallowClone() *Collection
type CollectionLoadInfo ¶
type Credential ¶
type Credential struct {
Username string
EncryptedPassword string
Tenant string
IsSuper bool
Sha256Password string
TimeTick uint64 // the timetick in wal which the credential updates
}
func UnmarshalCredentialModel ¶
func UnmarshalCredentialModel(cred *internalpb.CredentialInfo) *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(prop []*commonpb.KeyValuePair) *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 FileResource ¶
func UnmarshalFileResourceInfo ¶
func UnmarshalFileResourceInfo(resource *pb.FileResourceInfo) *FileResource
func (*FileResource) Marshal ¶
func (resource *FileResource) Marshal() *pb.FileResourceInfo
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
func WithStructArrayFields ¶
func WithStructArrayFields() Option
type Partition ¶
type Partition struct {
PartitionID int64
PartitionName string
PartitionCreatedTimestamp uint64
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
// The byte size of serialized index data at oos. (compressed)
IndexSerializedSize uint64
// The byte size of index data in memory. (uncompressed)
// The IndexMemSize may not be stored at old milvus implementation, so it may be not accurate.
// (generated by the IndexSerializedSize multiplied with a configured compress-ratio).
IndexMemSize uint64
// deprecated
WriteHandoff bool
CurrentIndexVersion int32
IndexStoreVersion int64
FinishedUTCTime uint64
CurrentScalarIndexVersion int32
IndexType string
}
func CloneSegmentIndex ¶
func CloneSegmentIndex(segIndex *SegmentIndex) *SegmentIndex
func UnmarshalSegmentIndexModel ¶
func UnmarshalSegmentIndexModel(segIndex *indexpb.SegmentIndex) *SegmentIndex
type StructArrayField ¶
type StructArrayField struct {
FieldID int64
Name string
Description string
Fields []*Field
TypeParams []*commonpb.KeyValuePair
}
func CloneStructArrayFields ¶
func CloneStructArrayFields(structArrayFields []*StructArrayField) []*StructArrayField
func UnmarshalStructArrayFieldModel ¶
func UnmarshalStructArrayFieldModel(fieldSchema *schemapb.StructArrayFieldSchema) *StructArrayField
func UnmarshalStructArrayFieldModels ¶
func UnmarshalStructArrayFieldModels(fieldSchemas []*schemapb.StructArrayFieldSchema) []*StructArrayField
func (*StructArrayField) Clone ¶
func (s *StructArrayField) Clone() *StructArrayField
func (*StructArrayField) Equal ¶
func (s *StructArrayField) Equal(other StructArrayField) bool
Click to show internal directories.
Click to hide internal directories.