Crates.io | aliyun-tablestore-rs |
lib.rs | aliyun-tablestore-rs |
version | 0.1.2 |
created_at | 2025-04-16 02:26:17.408775+00 |
updated_at | 2025-04-16 02:52:22.278521+00 |
description | 阿里云表格存储(OTS)Rust SDK。 Aliyun Tablestore Rust SDK |
homepage | |
repository | https://github.com/yuqiang-yuan/aliyun-tablestore-rs |
max_upload_size | |
id | 1635587 |
size | 1,026,395 |
This is a Rust SDK for the Aliyun Tablestore (OTS) service. Aliyun tablestore is a fully managed NoSQL database service that provides high-performance, scalable, and cost-effective storage for large amounts of structured data. It supports various data models such as key-value, wide-column, and document, and offers features like strong consistency, global distribution, and automatic sharding.
This project has designed chained calling methods for types with many attributes, making it more convenient to use. Additionally, most parameters are designed to take ownership - while this may use more memory, it's more convenient in asynchronous scenarios and designs with retry mechanisms.
So far, local transactions, tunnel and streaming NOT supported.
There operations are implemented:
Wide-column table
Time series table
SQL Query
use aliyun_tablestore_rs::{data::GetRangeRequest, OtsClient, OtsResult};
#[tokio::main]
pub async fn main() -> OtsResult<()> {
let client = OtsClient::new(
"your_ak_id",
"your_ak_sec",
"https://instance-name.region.ots.aliyuncs.com",
);
let resp = client
.get_range(
GetRangeRequest::new("users")
.start_primary_key_column_string("user_id_part", "0000")
.start_primary_key_column_string("user_id", "0000006e-3d96-42b2-a624-d8ec9c52ad54")
.end_primary_key_column_string("user_id_part", "0000")
.end_primary_key_column_inf_max("user_id")
.limit(100),
)
.send()
.await?;
for row in &resp.rows {
println!("{:#?}", row);
}
Ok(())
}