Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DriverName ¶ added in v1.2.1
DriverName maps the dialect-style names accepted in .quark.yml (and by `quark init --dialect`) to the database/sql driver names actually registered in this binary. `quark init` writes `driver: postgresql`, but the registered PostgreSQL driver is pgx, so passing the config value straight to sql.Open fails with `unknown driver "postgresql"`. Unknown names pass through untouched so custom drivers keep working.
func GetAdminQuarkClient ¶
func GetQuarkClient ¶
func GetTenantQuarkClient ¶ added in v1.2.2
GetTenantQuarkClient opens a client connected to ONE tenant's database. It exists so `quark tenant migrate`/`migrate-all` operate on the tenant the caller named instead of silently migrating the default database (QK-P1-3).
Only the db_per_tenant strategy is resolvable from static CLI config: the DSN comes from `tenant.dsn_template`, with the literal `{tenant}` replaced by the (already validated) tenant id. schema_per_tenant migrations need a TenantRouter wired to your models, which a standalone binary cannot build — that path returns an explicit error rather than a wrong-database migration.
Types ¶
This section is empty.