Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dot ¶
func Dot(db *interpreter.Database) string
Dot generates a Graphviz DOT representation of the database schema.
func Dump ¶
func Dump(db *interpreter.Database, d Dialect) string
Dump generates a full CREATE TABLE script for the given schema and dialect.
func IsNormalized ¶
IsNormalized returns true if the database_type string has the " normalized" suffix.
func IsNormalizedDatabase ¶
func IsNormalizedDatabase(db *interpreter.Database) bool
IsNormalizedDatabase returns true if the database has a " normalized" suffix in its database_type Project setting.
Types ¶
type Dialect ¶
type Dialect int
Dialect represents the target SQL dialect.
func DialectFromDatabase ¶
func DialectFromDatabase(db *interpreter.Database) Dialect
DialectFromDatabase extracts the SQL dialect from an interpreter.Database's Project.database_type setting. The " normalized" suffix is stripped before matching, so "MariaDB normalized" returns MariaDB.
func ParseDialect ¶
ParseDialect parses a dialect name into a Dialect constant. Accepts driver names (postgres, mariadb, sqlite), DBML database_type values (PostgreSQL, MariaDB, SQLite), and aliases. A " normalized" suffix is stripped before matching (e.g. "MariaDB normalized" → MariaDB). An empty string or bare "normalized" returns Generic mode.