public final class CatalogRuntimeToSQLEnvBridge extends TSQLEnv
TSQLEnv subclass whose only job is to install
CatalogBackedCatalogProvider via the legacy ICatalogProvider hook.
Plan §5.3 / §8.3. Per spike bridge-access-trace.md no method override is
required: TSQLEnv.doSearchSchemaObject(java.lang.String, java.lang.String, java.lang.String, gudusoft.gsqlparser.sqlenv.ESQLDataObjectType) already dispatches to
ICatalogProvider.findObject(java.lang.String, java.lang.String, java.lang.String, gudusoft.gsqlparser.sqlenv.ESQLDataObjectType) for fully-qualified lookups, and the legacy
mutation paths (addFunction, setDefaultCatalogName, addObject)
land naturally on the wrapped delegate.
The constructor calls super(vendor) (which builds the default
CatalogStoreProvider), captures that as the delegate, and then installs the
CatalogBackedCatalogProvider wrapper via the protected
setCatalogProviderForCompatibility hook added in P1D.1. Subsequent
TSQLEnv.getCatalogProvider() calls return the bridged provider; lookups missing
from the legacy overlay will round-trip through the runtime resolver, materialize
via CatalogEntryToSQLEnvMapper, and be cached back into the delegate so the
next lookup is O(1).
initSQLEnv() is a no-op: the runtime is the metadata source, the bridge
is just a thin compatibility veneer. Construction also applies defaults from
CatalogLoadOptions (default catalog / schema / server) so the bridge plays the
same active-context role as the corresponding eager-loaded TSQLEnv.
catalogCollationCaseSensitive, columnCollationCaseSensitive, DEFAULT_DB_NAME, DEFAULT_SCHEMA_NAME, DEFAULT_SERVER_NAME, defaultCollationCaseSensitive, functionCollationCaseSensitive, isAliasReferenceForbidden, tableCollationCaseSensitive| Constructor and Description |
|---|
CatalogRuntimeToSQLEnvBridge(CatalogRuntime runtime,
CatalogLoadOptions options)
Construct a bridge for the given runtime.
|
CatalogRuntimeToSQLEnvBridge(EDbVendor vendor,
CatalogRuntime runtime,
CatalogLoadOptions options)
Construct a bridge for the given runtime and explicit vendor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
initSQLEnv()
This method must be override in the subclass to build a SQL environment with real metadata.
|
CatalogLoadOptions |
options()
Load options the bridge was constructed with, or
null if none. |
CatalogRuntime |
runtime()
The runtime backing this bridge.
|
addFunction, addFunction, addOraclePackage, addProcedure, addSQLRoutine, addTable, addTrigger, addView, columnInTable, compareColumn, compareColumn, compareIdentifier, compareIdentifier, compareIdentifier, compareQualifiedColumn, compareQualifiedTable, compareTable, compareTable, createSQLCatalog, createSQLSchema, delimitedChar, doAddCatalog, doAddSchemaObject, doAddSchemaObject, doSearchSchemaObject, endsWithDelimitedIdentifier, getAFullQualifiedSchemaObjectName, getCatalogList, getCatalogProvider, getCatalogStore, getColumnInTable, getColumnsInTable, getDatabaseName, getDatabaseName, getDBVendor, getDefaultCatalogName, getDefaultSchemaName, getDefaultServerName, getIdentifierProfile, getIdentifierService, getNumberOfTables, getObjectName, getObjectName, getProcedureParameterValue, getSchemaName, getSchemaName, getSQLCatalog, getSQLSchema, getStmtSeparatorChar, getVariableValue, isDelimitedIdentifier, isDelimitedIdentifier, isEnableGetMetadataFromDDL, isUsedBySqlflow, matchSubObjectNameToWhole, normalizeIdentifier, normalizeIdentifier, putSchemaObject, searchCatalog, searchFunction, searchFunction, searchSchemaObject, searchSchemaObject, searchTable, searchTable, setCatalogProviderForCompatibility, setDefaultCatalogName, setDefaultSchemaName, setDefaultServerName, setEnableGetMetadataFromDDL, supportCatalog, supportSchema, toStringpublic CatalogRuntimeToSQLEnvBridge(CatalogRuntime runtime, CatalogLoadOptions options)
TSQLEnv.runtime - the runtime that owns the snapshot, overlay, and lazy provider.options - optional load options; null is allowed — defaults are
read from the runtime alone in that case.public CatalogRuntimeToSQLEnvBridge(EDbVendor vendor, CatalogRuntime runtime, CatalogLoadOptions options)
public CatalogRuntime runtime()
TSQLEnv.getCatalogProvider().public CatalogLoadOptions options()
null if none. Retained so
downstream callers can introspect the loading mode / fetch caps without re-reading
the runtime.public void initSQLEnv()
TSQLEnvinitSQLEnv in class TSQLEnv