This commit is contained in:
2025-08-05 15:33:03 +02:00
parent 7856fc0a4e
commit 0c02d0e99f
326 changed files with 334 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
//! SAL PostgreSQL Client
//!
//! This crate provides a PostgreSQL client for interacting with PostgreSQL databases.
//! It offers connection management, query execution, and a builder pattern for flexible configuration.
//!
//! ## Features
//!
//! - **Connection Management**: Automatic connection handling and reconnection
//! - **Query Execution**: Simple API for executing queries and fetching results
//! - **Builder Pattern**: Flexible configuration with authentication support
//! - **Environment Variable Support**: Easy configuration through environment variables
//! - **Thread Safety**: Safe to use in multi-threaded applications
//! - **PostgreSQL Installer**: Install and configure PostgreSQL using nerdctl
//! - **Rhai Integration**: Scripting support for PostgreSQL operations
//!
//! ## Usage
//!
//! ```rust,no_run
//! use sal_postgresclient::{execute, query, query_one};
//!
//! fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // Execute a query
//! let rows_affected = execute("CREATE TABLE users (id SERIAL PRIMARY KEY, name TEXT)", &[])?;
//!
//! // Query data
//! let rows = query("SELECT * FROM users", &[])?;
//!
//! // Query single row
//! let row = query_one("SELECT * FROM users WHERE id = $1", &[&1])?;
//!
//! Ok(())
//! }
//! ```
mod installer;
mod postgresclient;
pub mod rhai;
// Re-export the public API
pub use installer::*;
pub use postgresclient::*;