001package gudusoft.gsqlparser.catalog.runtime;
002
003import gudusoft.gsqlparser.catalog.diagnostic.CatalogException;
004
005/**
006 * Lifecycle-bearing source of catalog metadata.
007 *
008 * <p>Plan §7.2 / §10.1. Static-file readers funnel through {@code UnifiedCatalogModel} into
009 * {@code ModelBackedCatalogProvider}; live sources (JDBC, Hive, Glue, Unity) implement this
010 * interface directly.</p>
011 *
012 * <p>Phase 1A skeleton — implementations land in P1B (T1B.7).</p>
013 */
014public interface CatalogProvider extends AutoCloseable {
015
016    CatalogProviderId id();
017
018    void open(CatalogProviderConfig config) throws CatalogException;
019
020    CatalogSnapshot snapshot(CatalogQuery query) throws CatalogException;
021
022    /** Force a fresh fetch bypassing any internal caches. */
023    CatalogSnapshot refresh(CatalogQuery query) throws CatalogException;
024
025    @Override
026    void close() throws CatalogException;
027}