public class CatalogStoreProvider extends Object implements ICatalogProvider
此实现基于 CatalogStore,使用 IdentifierService 进行标识符处理。
| Constructor and Description |
|---|
CatalogStoreProvider(CatalogStore catalogStore,
IdentifierService identifierService)
Creates a CatalogStoreProvider wrapping existing CatalogStore
|
CatalogStoreProvider(EDbVendor vendor)
Creates a CatalogStoreProvider with default flags
|
CatalogStoreProvider(EDbVendor vendor,
IdentifierProfile.VendorFlags flags)
Creates a CatalogStoreProvider with custom vendor flags
|
| Modifier and Type | Method and Description |
|---|---|
void |
addObject(TSQLSchemaObject object)
添加 schema 对象
|
void |
clear()
清空所有对象
|
TSQLCatalog |
createCatalog(String catalogName)
创建 catalog(已存在则返回现有)
|
TSQLSchemaObject |
findObject(String catalog,
String schema,
String objectName,
ESQLDataObjectType type)
查找 schema 对象(全限定名查找)
|
List<TSQLCatalog> |
getAllCatalogs()
获取所有 catalog
|
TSQLCatalog |
getCatalog(String catalogName)
获取 catalog(不存在返回 null)
|
CatalogStore |
getCatalogStore()
Get the underlying CatalogStore
|
String |
getDefaultCatalogName()
获取默认 catalog 名称
|
IdentifierService |
getIdentifierService()
Get the IdentifierService
|
void |
registerCatalog(TSQLCatalog catalog)
Register a catalog in the cache (used by TSQLEnv during migration)
|
boolean |
removeObject(TSQLSchemaObject object)
移除 schema 对象
|
void |
setDefaultCatalogName(String name)
设置默认 catalog 名称
|
int |
size()
获取对象总数
|
public CatalogStoreProvider(EDbVendor vendor)
vendor - database vendorpublic CatalogStoreProvider(EDbVendor vendor, IdentifierProfile.VendorFlags flags)
vendor - database vendorflags - vendor-specific flagspublic CatalogStoreProvider(CatalogStore catalogStore, IdentifierService identifierService)
catalogStore - existing catalog storeidentifierService - identifier servicepublic TSQLCatalog getCatalog(String catalogName)
ICatalogProvidergetCatalog in interface ICatalogProvidercatalogName - catalog 名称public TSQLCatalog createCatalog(String catalogName)
ICatalogProvidercreateCatalog in interface ICatalogProvidercatalogName - catalog 名称public List<TSQLCatalog> getAllCatalogs()
ICatalogProvidergetAllCatalogs in interface ICatalogProviderpublic String getDefaultCatalogName()
ICatalogProvidergetDefaultCatalogName in interface ICatalogProviderpublic void setDefaultCatalogName(String name)
ICatalogProvidersetDefaultCatalogName in interface ICatalogProvidername - 默认 catalog 名称public TSQLSchemaObject findObject(String catalog, String schema, String objectName, ESQLDataObjectType type)
ICatalogProviderfindObject in interface ICatalogProvidercatalog - catalog 名称schema - schema 名称objectName - 对象名称type - 对象类型public void addObject(TSQLSchemaObject object)
ICatalogProvideraddObject in interface ICatalogProviderobject - schema 对象public boolean removeObject(TSQLSchemaObject object)
ICatalogProviderremoveObject in interface ICatalogProviderobject - schema 对象public void clear()
ICatalogProviderclear in interface ICatalogProviderpublic int size()
ICatalogProvidersize in interface ICatalogProviderpublic CatalogStore getCatalogStore()
public IdentifierService getIdentifierService()
public void registerCatalog(TSQLCatalog catalog)
catalog - the catalog to register