CollectionSchema and FieldSchema.
API |
Description |
---|---|
Return the fields of collection. |
|
Return the description text about the collection. |
|
Return the primary key column of collection. |
|
Return whether the ids is automatically generated. |
pymilvus.
CollectionSchema
(fields, description='', **kwargs)¶fields
¶Returns the fields about the CollectionSchema.
List of FieldSchema, return when operation is successful.
>>> from pymilvus import FieldSchema, CollectionSchema, DataType
>>> field = FieldSchema("int64", DataType.INT64, description="int64", is_primary=True)
>>> schema = CollectionSchema(fields=[field])
>>> schema.fields
[]
description
¶Returns a text description of the CollectionSchema.
CollectionSchema description text, return when operation is successful.
>>> from pymilvus import FieldSchema, CollectionSchema, DataType
>>> field = FieldSchema("int64", DataType.INT64, description="int64", is_primary=True)
>>> schema = CollectionSchema(fields=[field], description="test get description")
>>> schema.description
'test get description'
auto_id
¶Whether the primary keys are automatically generated.
True: If the primary keys are automatically generated,
False: Otherwise.
>>> from pymilvus import FieldSchema, CollectionSchema, DataType
>>> field = FieldSchema("int64", DataType.INT64, description="int64", is_primary=True)
>>> schema = CollectionSchema(fields=[field])
>>> schema.auto_id
False
API |
Description |
---|---|
Return the name of field. |
|
Return whether the field is primary key column. |