Liking cljdoc? Tell your friends :D

wagoe.platform.shell.adapters.database.utils.driver-loader

Dynamic JDBC driver loading based on active database configurations.

This namespace provides configuration-driven driver loading that eliminates the need to coordinate between configuration files and command-line aliases. Drivers are loaded dynamically based on which databases are marked as :active in the configuration files.

Key Features:

  • Single source of truth: configuration files control everything
  • Clear error messages when drivers are missing
  • Automatic driver detection from active databases
  • No command-line alias coordination required

Usage: (require '[wagoe.platform.shell.adapters.database.utils.driver-loader :as dl])

;; Load drivers for active databases in current environment (dl/load-required-drivers!)

;; Load drivers for specific environment (dl/load-drivers-for-environment! "dev")

Dynamic JDBC driver loading based on active database configurations.

This namespace provides configuration-driven driver loading that eliminates
the need to coordinate between configuration files and command-line aliases.
Drivers are loaded dynamically based on which databases are marked as :active
in the configuration files.

Key Features:
- Single source of truth: configuration files control everything
- Clear error messages when drivers are missing
- Automatic driver detection from active databases
- No command-line alias coordination required

Usage:
  (require '[wagoe.platform.shell.adapters.database.utils.driver-loader :as dl])

  ;; Load drivers for active databases in current environment
  (dl/load-required-drivers!)

  ;; Load drivers for specific environment
  (dl/load-drivers-for-environment! "dev")
raw docstring

wagoe.platform.shell.adapters.database.utils.schema

Schema-to-DDL generation utilities for database adapters.

This namespace provides utilities for generating database DDL statements from Malli schema definitions. It handles:

  • Column type mapping based on database dialect
  • Table creation with constraints
  • Index generation from schema analysis
  • Cross-database compatibility

Key Features:

  • Uses Malli schemas as canonical source of truth
  • Database-specific column type mapping
  • Foreign key and unique constraint generation
  • Automatic index creation based on field patterns

Usage: (require '[wagoe.platform.shell.adapters.database.utils.schema :as schema])

(schema/generate-table-ddl ctx "users" some-malli-schema) (schema/initialize-tables-from-schemas! ctx schema-map)

Schema-to-DDL generation utilities for database adapters.

This namespace provides utilities for generating database DDL statements
from Malli schema definitions. It handles:
- Column type mapping based on database dialect
- Table creation with constraints
- Index generation from schema analysis
- Cross-database compatibility

Key Features:
- Uses Malli schemas as canonical source of truth
- Database-specific column type mapping
- Foreign key and unique constraint generation
- Automatic index creation based on field patterns

Usage:
  (require '[wagoe.platform.shell.adapters.database.utils.schema :as schema])

  (schema/generate-table-ddl ctx "users" some-malli-schema)
  (schema/initialize-tables-from-schemas! ctx schema-map)
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close