github.com/milvus-io/milvus-sdk-go/v2@v2.4.1/docs/has_partition.md (about)

     1  # Has Partition
     2  
     3  API to check if a partition from a collection with specified name exists.
     4  
     5  ## Params
     6  
     7  | Parameter    | Description                                                  | Type                     |
     8  | ------------ | ------------------------------------------------------------ | ------------------------ |
     9  | `ctx`        | Context to control API invocation process.                    | context.Context          |
    10  | `collName`   | Name of the collection with the partition to check.           | String                   |
    11  | `partitionName` | Name of the partition to check.                            | String                   |
    12  
    13  
    14  ## Response
    15  
    16  - `result`: boolean value that stands for whether the partition exists or not.
    17  
    18  - `err`: error in the process (if any). Possible errors are listed below:
    19  
    20      - `ErrClientNotReady`, error that the client is not connected.
    21  
    22      - error that API invocation failed.
    23  
    24  ## Example
    25  
    26  ```go
    27  ctx := context.Background()
    28  // cli is a valid Client instance, assume test collection exists
    29  has, err := cli.HasPartition(ctx, "TestCollection", "Partition1")
    30  // handles the error not nil
    31  ```