🚀 Try Zilliz Cloud, the fully managed Milvus, for free—experience 10x faster performance! Try Now>>

Milvus
Zilliz
< Docs
  • Go

ListDatabase()

This method returns a list of database names.

func (c *Client) ListDatabase(ctx context.Context, option ListDatabaseOption, callOptions ...grpc.CallOption) (databaseNames []string, err error)

Request Parameters

Parameter

Description

Type

ctx

Context for the current call to work.

context.Context

option

Optional parameters of the methods.

ListDatabaseOption

callOpts

Optional parameters for calling the methods.

grpc.CallOption

ListDatabaseOption

This is an interface type. The listDatabaseOption struct type implements this interface type.

You can use the NewListDatabaseOption() function to get the concrete implementation.

NewListDatabaseOption

The signature of this method is as follows:

func NewListDatabaseOption() *listDatabaseOption

The entity.Database struct type is as follows:

type Database struct {
    Name       string
    Properties map[string]string
}

Return

[]string

Example

dbNames, err := cli.ListDatabase(ctx, milvusclient.NewListDatabaseOption())
if err != nil {
    // handle err
}
fmt.Println(dbNames)

Try Managed Milvus for Free

Zilliz Cloud is hassle-free, powered by Milvus and 10x faster.

Get Started
Feedback

Was this page helpful?