Crate vertica_rs

Crate vertica_rs 

Source
Expand description

§vertica-rs

A native Rust client for Vertica databases, providing high-performance connectivity and query execution capabilities.

§Features

  • High Performance: Native Rust implementation with minimal overhead
  • Connection Pooling: Built-in connection pooling for efficient resource management
  • TLS Support: Secure connections with SSL/TLS encryption
  • Type Safety: Strongly typed API with comprehensive type conversions
  • Async Support: Optional async support (planned)
  • Prepared Statements: Support for prepared statements with parameter binding
  • Transaction Support: Full ACID transaction support

§Quick Start

use vertica_rs::{Client, ConnectionConfig};
 
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let config = ConnectionConfig::from_url("vertica://user:password@localhost:5433/database")?;
    let mut client = Client::connect(config)?;
     
    let result = client.query("SELECT * FROM users WHERE id = ?", &[1])?;
    for row in result {
        println!("User: {}", row.get_by_name::<String>("name")?);
    }
     
    Ok(())
}
*/

Re-exports§

pub use crate::client::Client;
pub use crate::conn::ConnectionConfig;
pub use crate::error::Result;
pub use crate::error::VerticaError;
pub use crate::query::QueryResult;
pub use crate::row::Row;
pub use crate::types::Value;

Modules§

client
conn
error
io
pool
prelude
Re-export commonly used types
query
row
types

Constants§

VERSION
Version information

Functions§

has_pool_support
Check if the library was compiled with connection pooling support
has_tls_support
Check if the library was compiled with TLS support
version
Library information