This tutorial is a separate Cargo project that downloads milvus-sdk-rust version 2.6.0
from crates.io. It demonstrates how to:
- Connect with
ClientV2. - List databases.
- Create and describe a database.
- Add and remove a database property.
- Select a database with
use_database. - Return to the default database and clean up.
- Rust and Cargo are installed.
- Milvus is running and accessible.
milvus-sdk-rustversion2.6.0has been published to crates.io.
The tutorial uses these environment variables:
| Variable | Default |
|---|---|
MILVUS_URI |
http://localhost:19530 |
MILVUS_TOKEN |
root:Milvus |
From the SDK repository root:
cargo run --manifest-path tutorial/7_database/Cargo.tomlOr from this directory:
cargo runThe program creates a uniquely named database and drops it before exiting normally.
MILVUS_URI="https://your-milvus-endpoint" \
MILVUS_TOKEN="your-token" \
cargo run --manifest-path tutorial/7_database/Cargo.tomlEach RPC accepts a validated request object constructed with Request::builder()...build()?.
Responses expose read-only accessors such as database_names(), database_name(), and
properties().
Calling create_database: create "RUST_V2_DATABASE_..."
create_database completed
Calling alter_database_properties: set database.replica.number=1
alter_database_properties completed
Calling use_database: select "RUST_V2_DATABASE_..."
use_database completed
Calling drop_database: remove "RUST_V2_DATABASE_..."
drop_database completed