| Modifier and Type | Method and Description |
|---|---|
static boolean |
DlineageUtil.compareIdentifier(String source,
String target,
ESQLDataObjectType sqlDataObjectType) |
static String |
DlineageUtil.getIdentifierNormalName(String name,
ESQLDataObjectType sqlDataObjectType)
Legacy display/normal-name form (global analysis vendor) — for equality use
DlineageUtil.sameName(gudusoft.gsqlparser.sqlenv.ESQLDataObjectType, java.lang.String, java.lang.String) / DlineageUtil.sameQualifiedName(gudusoft.gsqlparser.sqlenv.ESQLDataObjectType, java.lang.String, java.lang.String), not string compares on this result. |
static boolean |
DlineageUtil.sameName(ESQLDataObjectType objectType,
String a,
String b)
Single-segment identifier equality via the unified façade, using the bound
global analysis vendor; falls back to case-insensitive comparison when no
vendor is bound (model classes used outside an analysis run).
|
static boolean |
DlineageUtil.sameQualifiedName(ESQLDataObjectType objectType,
String a,
String b)
Like
DlineageUtil.sameName(gudusoft.gsqlparser.sqlenv.ESQLDataObjectType, java.lang.String, java.lang.String) but for possibly-qualified names; routes through the
segmenting SQLUtil#compareIdentifier. |
| Modifier and Type | Method and Description |
|---|---|
ESQLDataObjectType |
VendorNameMatcher.getDefaultObjectType()
Get the default object type.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
VendorNameMatcher.matches(String name1,
String name2,
ESQLDataObjectType objectType)
Check if two names match according to vendor rules for a specific object type.
|
String |
VendorNameMatcher.normalize(String name,
ESQLDataObjectType objectType)
Normalize a name according to vendor rules for a specific object type.
|
String |
VendorNameMatcher.normalizeQualifiedName(String qualifiedName,
ESQLDataObjectType objectType)
Normalize a qualified name (e.g., schema.table.column).
|
VendorNameMatcher |
VendorNameMatcher.withObjectType(ESQLDataObjectType objectType)
Create a new matcher with a different default object type.
|
| Constructor and Description |
|---|
VendorNameMatcher(EDbVendor vendor,
ESQLDataObjectType defaultObjectType)
Create a vendor name matcher with specified default object type.
|
| Constructor and Description |
|---|
Segment(String segmentKind,
ESQLDataObjectType objectType,
String text,
IdentifierInputForm inputForm) |
| Modifier and Type | Field and Description |
|---|---|
protected ESQLDataObjectType |
TSQLObject.dataObjectType |
ESQLDataObjectType |
NameKey.objectType |
ESQLDataObjectType |
QualifiedName.objectType |
| Modifier and Type | Method and Description |
|---|---|
ESQLDataObjectType |
TSQLObject.getDataObjectType()
Type of this database object
|
ESQLDataObjectType |
CatalogStore.QualifiedName.getType() |
static ESQLDataObjectType |
ESQLDataObjectType.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ESQLDataObjectType[] |
ESQLDataObjectType.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
| Modifier and Type | Method and Description |
|---|---|
TSQLRoutine |
TSQLEnv.addSQLRoutine(String qualifiedProcedureName,
boolean fromDDL,
ESQLDataObjectType type) |
ApproximateIdentifierKey |
IdentifierService.approximateKeyV1(ESQLDataObjectType objectType,
String name,
IdentifierInputForm form)
Mint the best-effort key that serves EVERY rule cell, including the
collation-based and mixed-kind cells
IdentifierService.persistentKeyV1(gudusoft.gsqlparser.sqlenv.ESQLDataObjectType, java.lang.String, gudusoft.gsqlparser.sqlenv.IdentifierInputForm) rejects:
quote-strip (lenient — a malformed quoted spelling keeps its identity
as written, mirroring IdentifierService.areEqual(java.lang.String, java.lang.String, gudusoft.gsqlparser.sqlenv.ESQLDataObjectType)'s totality) plus pinned simple
case-fold collapse. |
boolean |
IdentifierService.areEqual(String ident1,
String ident2,
ESQLDataObjectType objectType)
比较两个标识符是否相等(P0d.1:canonical-key equality)。
|
static boolean |
IdentifierService.areEqualStatic(EDbVendor dbVendor,
ESQLDataObjectType objectType,
String ident1,
String ident2)
High-performance static identifier comparison method with caching
|
void |
IdentifierService.assertSingleSegmentOrThrow(String identifier,
ESQLDataObjectType objectType)
断言标识符为单段,否则抛出异常
|
String |
IdentifierService.buildCompositeKey(List<String> segments,
ESQLDataObjectType objectType)
构造复合键(使用长度前缀编码避免冲突)
|
String |
IdentifierService.buildCompositeKey(String qualifiedName,
ESQLDataObjectType objectType)
构造复合键(从完整限定名)
|
String |
CompositeKeyOptimizer.buildCompositeKey(String qualifiedName,
ESQLDataObjectType objectType)
构建复合键(使用长度前缀编码避免冲突)
|
static String |
NameNormalizer.canonicalize(EDbVendor vendor,
ESQLDataObjectType type,
String identifier) |
CanonKey |
IdentifierService.canonKey(String identifier,
ESQLDataObjectType objectType)
Build the canonical key of a single identifier segment (unification plan stage P0c).
|
static CanonKey |
IdentifierService.canonKeyStatic(EDbVendor dbVendor,
ESQLDataObjectType objectType,
String identifier)
Static
IdentifierService.canonKey(java.lang.String, gudusoft.gsqlparser.sqlenv.ESQLDataObjectType) accessor over the cached default-flags service per vendor
(same cache IdentifierService.areEqualStatic(gudusoft.gsqlparser.EDbVendor, gudusoft.gsqlparser.sqlenv.ESQLDataObjectType, java.lang.String, java.lang.String) uses, so key equality mirrors that relation). |
static boolean |
TSQLEnv.compareIdentifier(EDbVendor dbVendor,
ESQLDataObjectType objectType,
String ident1,
String ident2)
Single-segment identifier equality — the same canonical relation as
SQLUtil.sameName(EDbVendor, ESQLDataObjectType,
String, String), which delegates here. |
static boolean |
TSQLEnv.compareIdentifier(EDbVendor dbVendor,
ESQLDataObjectType objectType,
TObjectName source,
TObjectName target)
Deprecated.
Compares the
toString() of the two object names, which can be a
multi-segment qualified string (sch.t.c) fed into a single-segment compare.
Use SQLUtil.compareIdentifier(EDbVendor,
ESQLDataObjectType, String, String) for possibly-qualified names, or
SQLUtil.sameName(EDbVendor, ESQLDataObjectType,
String, String) on the raw single-segment parts. See
gsp_java_core/doc/user_guide/identifier_normalization_guide.md. |
boolean |
TSQLEnv.compareIdentifier(ESQLDataObjectType objectType,
String ident1,
String ident2) |
static int |
TSQLObject.compareTo(EDbVendor dbVendor,
ESQLDataObjectType sqlDataObjectType,
String pTargetObjectName,
String objectName)
Deprecated.
since version 2.2.3.2(2021-05-10), replaced by @TSQLEnv.compareIdentifier()
|
static int |
TSQLObject.compareTo(EDbVendor dbVendor,
ESQLDataObjectType sqlDataObjectType,
TSQLObject targetDataObject,
String objectName) |
static int |
TSQLObject.compareTo(TSQLEnv sqlEnv,
ESQLDataObjectType sqlDataObjectType,
TSQLObject targetDataObject,
String objectName)
how to compare the name of database object is various from different databases due to the different implementation.
|
TSQLProcedure |
TSQLSchema.createProcedure(String procedureName,
ESQLDataObjectType type) |
protected TSQLSchemaObject |
TSQLOraclePackage.createSchemaObject(String schemaObjectName,
ESQLDataObjectType dataObjectType) |
TSQLSchemaObject |
TSQLSchema.createSchemaObject(String schemaObjectName,
ESQLDataObjectType dataObjectType) |
protected TSQLSchemaObject |
TSQLOraclePackage.createSchemaObject(String schemaObjectName,
ESQLDataObjectType dataObjectType,
int priority) |
protected TSQLSchemaObject |
TSQLSchema.createSchemaObject(String schemaObjectName,
ESQLDataObjectType dataObjectType,
int priority) |
Set<String> |
NameService.createSet(ESQLDataObjectType type)
Creates a Set whose membership follows canonical name equality: names are the
same element iff their
CanonKeys are equal. |
static String |
IdentifierCodec.decodeLexical(IdentifierProfile profile,
ESQLDataObjectType objectType,
String lexical)
Decode one lexical identifier to its stored text.
|
String |
IdentifierService.describePolicyV1(ESQLDataObjectType objectType)
Human-readable rendering of the V1 policies for one object type — a
diagnostic, explicitly NOT the identity (
policyId is the hash
of the binary descriptor), so this formatting can improve without
rotating any stored key. |
List<String> |
NameService.distinctCopy(ESQLDataObjectType type,
Iterable<String> names)
Creates a distinct copy of a collection, removing canonical duplicates.
|
TSQLSchemaObject |
TSQLEnv.doAddSchemaObject(String qualifiedObjectName,
ESQLDataObjectType objectType) |
TSQLSchemaObject |
TSQLEnv.doAddSchemaObject(TObjectName qualifiedObjectName,
ESQLDataObjectType objectType) |
protected TSQLSchemaObject |
TSQLEnv.doSearchSchemaObject(String catalog,
String schema,
String table,
ESQLDataObjectType objectType) |
static String |
IdentifierCodec.encodeStored(IdentifierProfile profile,
ESQLDataObjectType objectType,
String stored)
Encode stored text to a canonical lexical spelling.
|
boolean |
NameService.equals(ESQLDataObjectType type,
String name1,
String name2)
Checks if two names are equal under the canonical identifier-equality relation
(
IdentifierService.areEqualStatic(gudusoft.gsqlparser.EDbVendor, gudusoft.gsqlparser.sqlenv.ESQLDataObjectType, java.lang.String, java.lang.String)) for this vendor and object type. |
TSQLSchemaObject |
HierarchicalResolver.findSchemaObject(TSQLEnv env,
String qualifiedName,
ESQLDataObjectType objectType)
查找 schema 对象(通用方法)
|
TSQLSchemaObject |
CompositeKeyOptimizer.get(String qualifiedName,
ESQLDataObjectType objectType)
从复合键索引查找对象
|
TSQLSchemaObject |
CatalogStore.get(String catalog,
String schema,
String objectName,
ESQLDataObjectType type)
Finds an object by its fully-qualified name and type.
|
List<TSQLSchemaObject> |
CatalogStore.getByName(String objectName,
ESQLDataObjectType type)
Finds objects by name only, regardless of catalog/schema.
|
Collection<TSQLSchemaObject> |
CatalogStore.getByType(ESQLDataObjectType type)
Finds all objects of a specific type.
|
SqlNameMatcher |
NamePolicyFactory.getMatcherForType(ESQLDataObjectType type)
Gets or creates a SqlNameMatcher for the specified object type.
|
IdentifierRules |
IdentifierProfile.getRules(ESQLDataObjectType objectType)
获取指定对象类型的标识符规则
|
IdentifierProfile.ObjectGroup |
IdentifierProfile.groupOf(ESQLDataObjectType objectType)
将对象类型映射到对象组(公开访问器,供
CanonKey 的规则域标识使用) |
static boolean |
IdentifierCodec.hasQuotedForm(IdentifierProfile profile,
ESQLDataObjectType objectType)
Does this vendor/role have ANY quoted-identifier syntax?
false
only for vendors like SOQL where IdentifierCodec.encodeStored(gudusoft.gsqlparser.sqlenv.IdentifierProfile, gudusoft.gsqlparser.sqlenv.ESQLDataObjectType, java.lang.String) is the identity
— callers that need a delimiter for internal-key purposes (protecting
dots from qualified-name splitting) must supply their own fallback. |
int |
NameService.indexOf(ESQLDataObjectType type,
Iterable<String> names,
String target)
Finds the index of a name in a collection under canonical equality.
|
boolean |
NameService.isCaseSensitive(ESQLDataObjectType type)
Whether the UNQUOTED comparison policy for this object type is case-sensitive.
|
boolean |
NamePolicyFactory.isCaseSensitive(ESQLDataObjectType type)
Convenience method to check if a specific object type is case-sensitive
for this vendor.
|
static boolean |
IdentifierCodec.isQuoted(IdentifierProfile profile,
ESQLDataObjectType objectType,
String s)
Does this lexical spelling denote a QUOTED identifier for the
vendor/role — i.e.
|
static boolean |
IdentifierCodec.isVendorValidSpelling(IdentifierProfile profile,
ESQLDataObjectType objectType,
String lexical)
Is this lexical spelling valid SQL for the vendor — a stricter
property than being transport-decodable?
|
String |
IdentifierService.keyForMap(String identifier,
ESQLDataObjectType objectType)
为 Map 索引构造键(单个标识符段)
|
static boolean |
TSQLEnv.matchSubObjectNameToWhole(EDbVendor dbVendor,
ESQLDataObjectType sqlDataObjectType,
String sub,
String whole)
比较 一个数据库对象名是否等于或者属于另一个对象
等于 就是完全相等(根据不同数据库的比较规则)
属于 表示如下情况:
1.
|
String |
IdentifierService.normalize(String identifier,
ESQLDataObjectType objectType)
规范化标识符(去引号 + 大小写折叠)
|
static String |
TSQLEnv.normalizeIdentifier(EDbVendor dbVendor,
ESQLDataObjectType sqlDataObjectType,
String identifier)
Deprecated.
For equality tests use
SQLUtil.sameName(EDbVendor, ESQLDataObjectType,
String, String) or SQLUtil.compareIdentifier(
EDbVendor, ESQLDataObjectType, String, String) — never normalize-then-compare.
For the stored/display form use
IdentifierService.normalizeStatic(EDbVendor, ESQLDataObjectType, String);
for map keys use SQLUtil.canonKey(EDbVendor,
ESQLDataObjectType, String) or IdentifierService.keyForMap(String,
ESQLDataObjectType). |
String |
TSQLEnv.normalizeIdentifier(ESQLDataObjectType sqlDataObjectType,
String identifier) |
String |
IdentifierService.normalizeQualifiedName(String qualifiedName,
ESQLDataObjectType objectType)
规范化完整限定名(等价于 SQLUtil.getIdentifierNormalName)
|
String |
IdentifierService.normalizeSegment(String segment,
ESQLDataObjectType objectType)
规范化单个段(去引号 + 大小写折叠)
|
static String |
IdentifierService.normalizeStatic(EDbVendor dbVendor,
ESQLDataObjectType objectType,
String identifier)
High-performance static normalize method with caching
|
PersistentIdentifierKey |
IdentifierService.persistentKeyV1(ESQLDataObjectType objectType,
String name,
IdentifierInputForm form)
Mint the persistable canonical key of one identifier segment.
|
void |
CompositeKeyOptimizer.put(String qualifiedName,
ESQLDataObjectType objectType,
TSQLSchemaObject object)
添加对象到复合键索引
|
TSQLSchemaObject |
CompositeKeyOptimizer.remove(String qualifiedName,
ESQLDataObjectType objectType)
移除对象
|
TSQLSchemaObject |
TSQLEnv.searchSchemaObject(String qualifiedName,
ESQLDataObjectType objectType)
Phase 1: 使用 IdentifierService 的新方法处理多段名
|
protected TSQLSchemaObject |
TSQLEnv.searchSchemaObject(TObjectName qualifiedName,
ESQLDataObjectType objectType) |
void |
TSQLObject.setDataObjectType(ESQLDataObjectType dataObjectType) |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
IdentifierService.keysForHierarchy(String qualifiedName,
List<ESQLDataObjectType> partTypes)
生成层级索引所需的段级键列表
|
| Constructor and Description |
|---|
BucketedIndex(CollatorProvider collatorProvider,
String collationName,
ESQLDataObjectType objectType)
构造分桶索引
|
NameKey(ESQLDataObjectType objectType,
String server,
String catalog,
String schema,
String object) |
QualifiedName(EDbVendor vendor,
String server,
String catalog,
String schema,
String object,
String column,
ESQLDataObjectType objectType) |
QualifiedName(String catalog,
String schema,
String objectName,
ESQLDataObjectType type) |
TSQLObject(TSQLEnv sqlEnv,
String objectName,
ESQLDataObjectType dataObjectType)
create a new database object and add to the SQL environment.
|
TSQLProcedure(TSQLOraclePackage oraclePackage,
String procedureName,
ESQLDataObjectType dataObjectType) |
TSQLProcedure(TSQLSchema sqlSchema,
String procedureName,
ESQLDataObjectType dataObjectType) |
TSQLRoutine(TSQLSchema schema,
String objectName,
ESQLDataObjectType dataObjectType) |
TSQLSchemaObject(TSQLSchema schema,
String objectName,
ESQLDataObjectType dataObjectType) |
TSQLSchemaObject(TSQLSchema schema,
String objectName,
ESQLDataObjectType dataObjectType,
int priority) |
| Modifier and Type | Method and Description |
|---|---|
TSQLSchemaObject |
ICatalogProvider.findObject(String catalog,
String schema,
String objectName,
ESQLDataObjectType type)
查找 schema 对象(全限定名查找)
|
TSQLSchemaObject |
CatalogStoreProvider.findObject(String catalog,
String schema,
String objectName,
ESQLDataObjectType type) |
TSQLSchemaObject |
LegacyCatalogProvider.findObject(String catalog,
String schema,
String objectName,
ESQLDataObjectType type) |
void |
DifferenceLogger.logNewSearchError(String catalog,
String schema,
String objectName,
ESQLDataObjectType type,
Throwable e)
记录新实现的 search 错误
|
void |
DifferenceLogger.logSearchDifference(String catalog,
String schema,
String objectName,
ESQLDataObjectType type,
TSQLSchemaObject legacyResult,
TSQLSchemaObject newResult)
记录搜索结果差异
|
void |
DifferenceLogger.logSearchMiss(String catalog,
String schema,
String objectName,
ESQLDataObjectType type)
记录搜索 miss(新实现未找到对象)
|
| Modifier and Type | Method and Description |
|---|---|
TSQLSchemaObject |
CatalogBackedCatalogProvider.findObject(String catalog,
String schema,
String objectName,
ESQLDataObjectType type) |
| Modifier and Type | Method and Description |
|---|---|
ESQLDataObjectType |
Identifier.getSqlDataObjectType() |
| Modifier and Type | Method and Description |
|---|---|
static CanonKey |
SQLUtil.canonKey(EDbVendor dbVendor,
ESQLDataObjectType objectType,
String identifier)
Canonical identity key of a single identifier segment — key equality is exactly
SQLUtil.sameName(gudusoft.gsqlparser.EDbVendor, gudusoft.gsqlparser.sqlenv.ESQLDataObjectType, java.lang.String, java.lang.String) (see CanonKey; in-process
only, never persist). |
static boolean |
SQLUtil.compareIdentifier(EDbVendor dbVendor,
ESQLDataObjectType sqlDataObjectType,
String identifier1,
String identifier2) |
static String |
SQLUtil.decodeDelimitedName(EDbVendor vendor,
ESQLDataObjectType objectType,
String name)
Decode a delimited identifier spelling to the undelimited name a catalog
stores, WITHOUT case folding:
[Volgorde], "Volgorde",
`Volgorde` and the SQL Server legacy column-alias form
'Volgorde' all decode to Volgorde, and escaped delimiters
resolve ([Esc]]aped] → Esc]aped). |
static String |
SQLUtil.getIdentifierNormalName(EDbVendor dbVendor,
String name,
ESQLDataObjectType sqlDataObjectType)
规范化多段限定名(Multi-Segment Qualified Name)并返回规范化后的完整限定名。
|
static String |
SQLUtil.normalizeIdentifier(EDbVendor dbVendor,
ESQLDataObjectType objectType,
String identifier)
Deprecated.
For equality tests use
SQLUtil.sameName(EDbVendor, ESQLDataObjectType,
String, String) / SQLUtil.compareIdentifier(EDbVendor, ESQLDataObjectType, String,
String) — never normalize-then-compare. For map keys use SQLUtil.canonKey(EDbVendor,
ESQLDataObjectType, String) (or IdentifierService.keyForMap(String,
ESQLDataObjectType)); for the stored/display form use
IdentifierService.normalizeStatic(EDbVendor, ESQLDataObjectType, String).
Retained only for callers that persist the legacy normal form (e.g. dlineage
display names — see the identifier normalization guide §6). |
static String |
SQLUtil.quoteDottedName(EDbVendor vendor,
ESQLDataObjectType objectType,
String name)
Quote one name segment so its dots survive qualified-name splitting
(
SQLUtil.parseNames(java.lang.String)), using the vendor's REAL quoted-identifier form. |
static boolean |
SQLUtil.sameName(EDbVendor dbVendor,
ESQLDataObjectType objectType,
String ident1,
String ident2)
Single-segment SQL identifier equality — the unified façade for
identifier-vs-identifier name comparisons (see
docs/refactor/identifier_normalization_unification_plan.md).
|
| Constructor and Description |
|---|
Identifier(EDbVendor vendor,
ESQLDataObjectType sqlDataObjectType,
String identifier) |