spanner-rs
An asynchronous Rust client for Cloud Spanner.
Implementation
The client uses gRPC to interface with Cloud Spanner. As such, this crate uses tonic and related crates (i.e.: prost, tower and tokio).
The client also uses bb8 to maintain a pool of Cloud Spanner sessions (conceptually similar to a connection pool in other databases).
The implementation is heavily inspired by the excellent postgres and related crates.
Status
Spanner is a complex database and this client does not implement all available features. The current focus is on getting idiomatic SQL support for both reads and writes.
It's not recommended to use this in production for any serious workload.
Features
Database Client
- SQL read-only, single use, time-bounded transactions
- SQL read-write transactions with retries
- Type classes to convert Rust values to/from Cloud Spanner values
- Timestamp and Date type support (chrono feature?)
- Json type support (serde json feature)
- Streaming result sets
- Derive
ToSpannerandFromSpannerforstructs
Admin Client
- DDL statements
Example
use ;
async