public final class CatalogEntryToSQLEnvMapper extends Object
CatalogEntry into the legacy TSQLSchemaObject
shape consumed by TSQLResolver2.
Plan §6 / §7.4. Mapping is driven by CatalogObjectKind; the mapper
delegates to the existing public TSQLEnv mutation API (per spike T0.3
inventory) so the eager bridge uses no reflection and no private-field access.
Sequences are not first-class on TSQLEnv (no dotSequence type
in ESQLDataObjectType), so toTSQLSequence(gudusoft.gsqlparser.catalog.runtime.CatalogEntry, gudusoft.gsqlparser.sqlenv.TSQLEnv) returns null.
The runtime layer still represents sequences in CatalogSnapshot;
callers that need them should consult the runtime directly.
| Constructor and Description |
|---|
CatalogEntryToSQLEnvMapper() |
| Modifier and Type | Method and Description |
|---|---|
TSQLSchemaObject |
toSQLSchemaObject(CatalogEntry entry,
TSQLEnv targetEnv)
Dispatch helper: route a
CatalogEntry to the right typed mapper based on its
CatalogObjectKind. |
TSQLSchemaObject |
toSQLSchemaObject(CatalogEntry entry,
TSQLEnv targetEnv,
List<CatalogEntry> columnChildren)
Same as
toSQLSchemaObject(CatalogEntry, TSQLEnv) but lets the caller
supply a list of column entries that will be attached to a TABLE / VIEW /
MATERIALIZED_VIEW result via TSQLTable.addColumn(String). |
TSQLFunction |
toTSQLFunction(CatalogEntry entry,
TSQLEnv targetEnv) |
TSQLOraclePackage |
toTSQLOraclePackage(CatalogEntry entry,
TSQLEnv targetEnv) |
TSQLProcedure |
toTSQLProcedure(CatalogEntry entry,
TSQLEnv targetEnv) |
TSQLSchemaObject |
toTSQLSequence(CatalogEntry entry,
TSQLEnv targetEnv)
|
TSQLSchemaObject |
toTSQLSynonym(CatalogEntry entry,
TSQLEnv targetEnv) |
TSQLTable |
toTSQLTable(CatalogEntry entry,
TSQLEnv targetEnv) |
TSQLTable |
toTSQLTable(CatalogEntry entry,
TSQLEnv targetEnv,
List<CatalogEntry> columnChildren)
Materialize a TABLE entry and attach the supplied column entries.
|
TSQLSchemaObject |
toTSQLTrigger(CatalogEntry entry,
TSQLEnv targetEnv) |
TSQLTable |
toTSQLView(CatalogEntry entry,
TSQLEnv targetEnv)
Views are represented in the legacy model as
TSQLTable with view metadata. |
TSQLTable |
toTSQLView(CatalogEntry entry,
TSQLEnv targetEnv,
List<CatalogEntry> columnChildren)
Same as
toTSQLView(CatalogEntry, TSQLEnv) but with explicit column entries
for the lazy bridge path. |
public CatalogEntryToSQLEnvMapper()
public TSQLSchemaObject toSQLSchemaObject(CatalogEntry entry, TSQLEnv targetEnv)
CatalogEntry to the right typed mapper based on its
CatalogObjectKind. Kinds that do not have a TSQLEnv representation
(CATALOG, SCHEMA, COLUMN, CONSTRAINT, INDEX, TYPE, MATERIALIZED_VIEW collapsed to
VIEW, SEQUENCE) return null; the loader and bridge treat that as "skip".public TSQLSchemaObject toSQLSchemaObject(CatalogEntry entry, TSQLEnv targetEnv, List<CatalogEntry> columnChildren)
toSQLSchemaObject(CatalogEntry, TSQLEnv) but lets the caller
supply a list of column entries that will be attached to a TABLE / VIEW /
MATERIALIZED_VIEW result via TSQLTable.addColumn(String). The legacy
resolver reads TSQLTable.getColumnList() directly during the column
push-down phase, so a lazy materialization that drops columns silently
regresses column resolution. The lazy bridge fills this list from
CatalogRuntime.findChildren(parentId, COLUMN).public TSQLTable toTSQLTable(CatalogEntry entry, TSQLEnv targetEnv)
public TSQLTable toTSQLTable(CatalogEntry entry, TSQLEnv targetEnv, List<CatalogEntry> columnChildren)
TSQLTable carries a non-empty
getColumnList(); the resolver's column push-down path reads that list and
silently fails on empty results otherwise.public TSQLTable toTSQLView(CatalogEntry entry, TSQLEnv targetEnv)
TSQLTable with view metadata.public TSQLTable toTSQLView(CatalogEntry entry, TSQLEnv targetEnv, List<CatalogEntry> columnChildren)
toTSQLView(CatalogEntry, TSQLEnv) but with explicit column entries
for the lazy bridge path.public TSQLFunction toTSQLFunction(CatalogEntry entry, TSQLEnv targetEnv)
public TSQLProcedure toTSQLProcedure(CatalogEntry entry, TSQLEnv targetEnv)
public TSQLOraclePackage toTSQLOraclePackage(CatalogEntry entry, TSQLEnv targetEnv)
public TSQLSchemaObject toTSQLSynonym(CatalogEntry entry, TSQLEnv targetEnv)
public TSQLSchemaObject toTSQLSequence(CatalogEntry entry, TSQLEnv targetEnv)
TSQLEnv (no dotSequence member of
ESQLDataObjectType). Returns null so callers can skip; the
runtime layer still represents sequences in CatalogSnapshot.public TSQLSchemaObject toTSQLTrigger(CatalogEntry entry, TSQLEnv targetEnv)