# Connection & Configuration

Prax provides flexible connection string parsing and configuration options for all supported databases. Support for environment variables, multi-database setups, and connection pooling.

## URL Parsing

Parse database connection URLs to extract all connection parameters.

## Supported URL Formats

Prax supports standard connection URL formats for PostgreSQL, MySQL, and SQLite.

#### Common Query Parameters

Parameter | Description
--- | ---
`sslmode` | SSL/TLS mode (disable, require, verify-full)
`connect_timeout` | Connection timeout in seconds
`application_name` | Application identifier
`schema` | Default schema/search_path

## Builder Pattern

Use the builder pattern for programmatic configuration with full type safety.

## Multi-Database Configuration

Configure multiple databases for read replicas, analytics, or different services.

#### Load Balancing Strategies

`RoundRobin`

Distribute evenly across replicas

`Random`

Random replica selection

`First`

Always use first available

`LeastLatency`

Use lowest latency replica

## Environment Variables

Expand environment variables in connection strings for secure configuration.

#### 💡 Pro Tip

Use `${VAR:-default}` syntax to provide fallback values for development environments while keeping production config secure.

## Connection Pool Configuration

Configure connection pooling for optimal performance.

## SSL/TLS Configuration

Configure secure connections with SSL/TLS certificates.