[−][src]Module rbatis_drivers::postgres
Postgres RDBC Driver
This crate implements an RDBC Driver for the postgres
crate.
The RDBC (Rust DataBase Connectivity) API is loosely based on the ODBC and JDBC standards.
use crate::*; use rdbc::postgres::PostgresDriver; use rdbc::Driver; let driver = PostgresDriver::new(); let mut conn = driver.connect("postgres://postgres:password@localhost:5433").unwrap(); let mut stmt = conn.prepare("SELECT a FROM b WHERE c = ?").unwrap(); let mut rs = stmt.execute_query(&[Value::Int32(123)]).unwrap(); while rs.next() { println!("{:?}", rs.get_string(1)); }
Structs
PostgresDriver |