public final class UnifiedCatalogModel extends Object
CatalogInputReaders and consumed by
the runtime + bridge layers.
Plan §6 (artifact layout) / §7.1 (schema). Format-agnostic: JSON / YAML / DDL / dbt manifests / vendor dumps all funnel into this shape.
The build-time checks here cover only structural invariants. Deeper consistency
(duplicate qualified names, identifier round-trip, table↔column referential integrity)
is enforced by CatalogModelValidator per plan §9.6 — see Round 3 (T1B.2).
| Modifier and Type | Class and Description |
|---|---|
static class |
UnifiedCatalogModel.Builder |
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_API_VERSION
Default
apiVersion carried by manifests that don't set one. |
| Modifier and Type | Method and Description |
|---|---|
String |
apiVersion() |
static UnifiedCatalogModel.Builder |
builder() |
List<CatalogModel> |
catalogs() |
DefaultsConfig |
defaults() |
boolean |
equals(Object o) |
int |
hashCode() |
IdentifierConfig |
identifierConfig() |
String |
lexical(ESQLDataObjectType role,
String name)
The SQL spelling of one of this model's names, per its
nameForm(). |
IdentifierInputForm |
nameForm()
How every object name in this model is written: as SQL text
(
IdentifierInputForm.SQL_LEXICAL, "Amount" / [Order ID], an
undelimited name folds the way the vendor folds it) or as the name the database
catalog holds (IdentifierInputForm.CATALOG_STORED, Amount IS the
stored name). |
boolean |
nameFormDeclared()
Whether the input stated its
nameForm() itself, as opposed to receiving the
format's default. |
CatalogSourceInfo |
sourceInfo()
Provenance of this model.
|
String |
toString() |
EDbVendor |
vendor() |
public static final String DEFAULT_API_VERSION
apiVersion carried by manifests that don't set one. Plan Q9.public static UnifiedCatalogModel.Builder builder()
public String apiVersion()
public IdentifierConfig identifierConfig()
public DefaultsConfig defaults()
public List<CatalogModel> catalogs()
public CatalogSourceInfo sourceInfo()
null for in-memory / programmatic builds.public IdentifierInputForm nameForm()
IdentifierInputForm.SQL_LEXICAL, "Amount" / [Order ID], an
undelimited name folds the way the vendor folds it) or as the name the database
catalog holds (IdentifierInputForm.CATALOG_STORED, Amount IS the
stored name). One form per model: a single input must not mix the two.
A model built in code defaults to SQL_LEXICAL, which is how names were
always treated. JsonManifestCatalogInputReader defaults a manifest file to
CATALOG_STORED; a file overrides either default with a root nameForm.
See docs/refactor/identifier/README.md, "Catalog inputs and name output".
public boolean nameFormDeclared()
nameForm() itself, as opposed to receiving the
format's default. The validator uses it: a name that the two forms read differently is
worth a warning only while nobody has said which form was meant.public String lexical(ESQLDataObjectType role, String name)
nameForm(). Every consumer
of a model reads names as SQL text (the validator, SQLEnvCatalogLoader, the runtime
snapshot built by ModelBackedCatalogProvider), so each of them passes a name
through here first. A SQL_LEXICAL name comes back unchanged; a
CATALOG_STORED name comes back as the delimited spelling of the same stored name
(TSQLEnv.toLexical(gudusoft.gsqlparser.EDbVendor, gudusoft.gsqlparser.sqlenv.ESQLDataObjectType, java.lang.String, gudusoft.gsqlparser.sqlenv.IdentifierInputForm)). Keeping the rule here is what stops one consumer from
honouring the declaration while another ignores it.
Only single names follow the form. A dotted reference
(SynonymModel.targetQualifiedName, ConstraintModel.referencedTable) is SQL
text by construction: a stored name may itself contain a dot, so stored names joined with
dots could not be split back.