import { Client } from './Client'; import { ResStatus, BoolResponse, ShowPartitionsResponse, StatisticsResponse } from './types'; import { CreatePartitionReq, DropPartitionReq, GetPartitionStatisticsReq, HasPartitionReq, LoadPartitionsReq, ReleasePartitionsReq, ShowPartitionsReq } from './types/Partition'; export declare class Partition extends Client { /** * Create a partition in a collection. * * @param data * | Property | Type | Description | * | :----------------- | :---- | :------------------------------- | * | collection_name | String | Collection name | * | partition_name | String | Partition name | * | timeout | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined | * * @return * | Property | Description | * | :-------------| :-------- | * | error_code | Error code number | * | reason | Error cause | * * * #### Example * * ``` * new milvusClient(MILUVS_ADDRESS).partitionManager.createPartition({ * collection_name: 'my_collection', * partition_name: 'my_partition', * }); * ``` */ createPartition(data: CreatePartitionReq): Promise; /** * Check if a partition exists in a collection. * * @param data * | Property | Type | Description | * | :----------------- | :---- | :------------------------------- | * | collection_name | string | Collection name | * | partition_name | string | Parititon name | * | timeout | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined | * * @return * | Property | Description | * | :-------------| :------------------------------- | * | status | { error_code: number,reason:string }| * | value | `true` or `false` | * * #### Example * * ``` * new milvusClient(MILUVS_ADDRESS).partitionManager.hasPartition({ * collection_name: 'my_collection', * partition_name: 'my_partition', * }); * ``` */ hasPartition(data: HasPartitionReq): Promise; /** * Show all partitions in a collection. * * @param data * | Property | Type | Description | * | :----------------- | :---- | :------------------------------- | * | collection_name | String | Collection name | * | timeout | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined | * * @return * | Property | Description | * | :-------------| :------------------------------- | * | status | { error_code: number, reason: string }| * | partition_names | Array of partition names | * | partitionIDs | Array of partition IDs | * * * #### Example * * ``` * new milvusClient(MILUVS_ADDRESS).partitionManager.showPartitions({ * collection_name: 'my_collection', * }); * ``` */ showPartitions(data: ShowPartitionsReq): Promise; /** * Show the statistics information of a partition. * * @param data * | Property | Type | Description | * | :----------------- | :---- | :------------------------------- | * | collection_name | String | Collection name | * | partition_name | String | Partition name | * | timeout | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined | * * @return * | Property | Description | * | :-------------| :------------------------------- | * | status | { error_code: number, reason: string }| * | stats | [{key: string, value: string}] | * | data | { row_count: 0 } transformed from **stats** | * * * #### Example * * ``` * new milvusClient(MILUVS_ADDRESS).partitionManager.getPartitionStatistics({ * collection_name: 'my_collection', * partition_name: "_default", * }); * ``` */ getPartitionStatistics(data: GetPartitionStatisticsReq): Promise; /** * Load a partition into cache. * * @param data * | Property | Type | Description | * | :----------------- | :---- | :------------------------------- | * | collection_name | String | Collection name | * | partition_names | String[] | Array of partition names | * | timeout | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined | * * @return * | Property | Description | * | :-------------| :-------- | * | error_code | Error code number | * | reason | Error cause | * * * #### Example * * ``` * new milvusClient(MILUVS_ADDRESS).partitionManager.loadPartitions({ * collection_name: 'my_collection', * partition_names: ['my_partition'], * }); * ``` */ loadPartitions(data: LoadPartitionsReq): Promise; /** * Release a partition from cache. * * @param data * | Property | Type | Description | * | :----------------- | :---- | :------------------------------- | * | collection_name | String | Collection name | * | partition_names | String[] | Array of partition names | * | timeout | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined | * * @return * | Property | Description | * | :-------------| :-------- | * | error_code | Error code number | * | reason | Error cause | * * * #### Example * * ``` * new milvusClient(MILUVS_ADDRESS).partitionManager.releasePartitions({ * collection_name: 'my_collection', * partition_names: ['my_partition'], * }); * ``` */ releasePartitions(data: ReleasePartitionsReq): Promise; /** * Drop a partition. Note that it will drop all data in the partition. * Default partition cannot be droped. * @param data * @returns */ /** * To drop a partition will drop all data in this partition and the `_default` partition cannot be dropped. * * @param data * | Property | Type | Description | * | :----------------- | :---- | :------------------------------- | * | collection_name | String | Collection name | * | partition_name | String | Partition name | * | timeout | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined | * * @return * | Property | Description | * | :-------------| :-------- | * | error_code | Error code number | * | reason | Error cause | * * * #### Example * * ``` * new milvusClient(MILUVS_ADDRESS).partitionManager.dropPartition({ * collection_name: 'my_collection', * partition_name: 'my_partition', * }); * ``` */ dropPartition(data: DropPartitionReq): Promise; }