migra.engine
Migra_engine.Dialect
migra
type t =
| PostgreSQL
| MariaDB
| SQLite
module type DIALECT = sig ... end
module PostgreSQL_dialect : DIALECT
module MariaDB_dialect : DIALECT
module SQLite_dialect : DIALECT
val normalize_url : string -> string
Normalize database URL for Caqti compatibility
SQLite: caqti-driver-sqlite3 expects sqlite3:path (single colon), not sqlite3://path We accept both formats for user convenience but normalize to what Caqti expects.
Database URL
Normalized URL
val detect_from_url : string -> (t, string) result
Detect database type from URL scheme
Database URL (e.g., "postgresql://...", "sqlite3://...")
Ok dialect or Error message for unsupported schemes
val get_dialect : t -> (module DIALECT)
Get dialect module for database type
Database type
First-class module implementing DIALECT
val to_string : t -> string
Pretty-print database type
Human-readable string