Class QualifiedName
db.schema.name).
Prefer building it from the parse tree — QualifiedName.of(qualifiedNameParts(ctx)) — so the
structure comes straight from the grammar's identifier list. parse(String) is the fallback
for a name that is only ever available as a flattened / runtime string (a stored policy name, a
GET_DDL argument value, a DML table name resolved at execution time): the caller has already
decided it is a plain dotted name with no parse tree to read, so splitting it on '.' is a
value-level operation, not a re-derivation of syntax. Consolidating every qualified-name split into
this one method keeps that boundary explicit.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringJoin parts into the dotted formparse(java.lang.String)reads back to the same parts: a part holding a dot is quoted (an inner quote doubled), so"a.b"is never mistaken for a schemaaand a tableb.static StringThe row-storage key of a relation: its parts as written, joined asjoin(java.lang.String...)joins them.last()The last part — the object's own (unqualified) name.static QualifiedNameBuild from already-separated identifier parts (e.g. the parse tree's identifier list).static QualifiedNameSplit a flattened dotted name into its parts — for a name available only as a string.part(int i) The i-th part (0-based).String[]parts()A defensive copy of the parts.intsize()Number of parts (1 = name, 2 = schema.name, 3 = db.schema.name).toString()
-
Method Details
-
of
Build from already-separated identifier parts (e.g. the parse tree's identifier list). -
parse
Split a flattened dotted name into its parts — for a name available only as a string. A dot inside double quotes belongs to its part:db.s."a.b"is three parts, the last onea.b, which is howjoin(java.lang.String...)spells a part that holds a dot. A quoted part without a dot is kept as written, quotes and all, exactly as a plain split always kept it. -
join
Join parts into the dotted formparse(java.lang.String)reads back to the same parts: a part holding a dot is quoted (an inner quote doubled), so"a.b"is never mistaken for a schemaaand a tableb. -
key
The row-storage key of a relation: its parts as written, joined asjoin(java.lang.String...)joins them. Every site that creates, finds, drops or snapshots a relation's rows builds its key here, so they agree for a name that holds a dot too.The parts arrive CANONICAL - an unquoted name folded to upper case by the parser, a quoted one verbatim - so the key is not folded again here: two relations whose names differ only in case are two relations, and folding would give them one store between them.
-
size
public int size()Number of parts (1 = name, 2 = schema.name, 3 = db.schema.name). -
part
The i-th part (0-based). -
last
The last part — the object's own (unqualified) name. -
parts
A defensive copy of the parts. -
toString
-