module
CQL::Configure
Overview
Centralized configuration for CQL.
Quick setup for different environments:
Development (run with CRYSTAL_ENV=development to get SQL logging)
CQL.configure do |config|
config.db = "postgresql://localhost/myapp"
end
Production
CQL.configure do |config|
config.db = ENV["DATABASE_URL"]
config.env = "production"
config.pool_size = 25
end
Custom Development Setup
CQL.configure do |config|
config.db = "postgresql://localhost/myapp"
config.sql_logging_colorize = false # Plain SQL logging output
end
Defined in:
configure.crconfigure/cache_config.cr
configure/config_validator.cr
configure/connection_pooling_config.cr
configure/database_config.cr
configure/database_url_builder.cr
configure/enviroment_strategy.cr
configure/ssl_config.cr
Class Method Summary
-
.configured? : Bool
Check if configuration has been initialized
-
.current : Config
Get the current configuration instance (thread-safe)
-
.reset! : Nil
Reset configuration to defaults (useful for testing)