跳到主要内容
版本:v2.5.x

AlterDatabaseProperties()

This method changes the specified properties of a database.

Go
func (c *Client) AlterDatabaseProperies(ctx context.Context, option AlterDatabasePropertiesOption, callOptions ...grpc.CallOption) error

Request Parameters​

Parameter

Description

Type

ctx

Context for the current call to work.

context.Context

option

Optional parameters of the methods.

AlterDatabasePropertiesOption

callOpts

Optional parameters for calling the methods.

grpc.CallOption

AlterDatabasePropertiesOption​

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

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

NewAlterDatabasePropertiesOption​

The signature of this method is as follows:

Go
func NewAlterDatabasePropertiesOption(dbName string) *alterDatabasePropertiesOption

Parameter

Description

Type

dbName

Name of the target database.

string

Return​

Null

Example​

Go
dbName := `test_db`
err = cli.AlterDatabaseProperties(ctx, milvusclient.NewAlterDatabasePropertiesOption(dbName).WithProperty("database.replica.number", 2))
if err != nil {
// handle err
}