1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// src/lib.rs
//! # PgWire Lite
//!
//! A lightweight PostgreSQL wire protocol client library built on top of libpq.
//!
//! This crate provides a simple, efficient interface for executing queries against
//! PostgreSQL-compatible servers, including StackQL and similar services.
//!
//! ## Features
//!
//! - Built on the robust libpq C library
//! - Simple API for query execution
//! - Comprehensive error handling with configurable verbosity
//! - Support for SSL/TLS connections
//! - Detailed query result information including notices
//!
//! ## Example
//!
//! ```rust
//! use pgwire_lite::PgwireLite;
//!
//! fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // Create a connection to PGWire protocol server (like a local StackQL server)
//! let conn = PgwireLite::new("localhost", 5444, false, "default")?;
//!
//! // Execute a multi-line query using a raw string
//! let result = conn.query(r#"
//! SELECT region, instance_type, COUNT(*) as num_instances
//! FROM aws.ec2.instances
//! WHERE region = 'us-east-1'
//! GROUP BY instance_type
//! "#)?;
//!
//! // Process the result
//! println!("Instance types in us-east-1:");
//! for row in &result.rows {
//! println!(
//! " {}: {} instances",
//! row.get("instance_type").unwrap(),
//! row.get("num_instances").unwrap()
//! );
//! }
//!
//! Ok(())
//! }
//! ```
// Re-export types from the connection module
pub use ;
// Re-export types from the notices module
pub use ;
// Re-export the Value type
pub use Value;