Class TObjectName

Object
gudusoft.gsqlparser.nodes.TParseTreeNode
gudusoft.gsqlparser.nodes.TObjectName
All Implemented Interfaces:
Visitable, Cloneable, Iterator<TSourceToken>

public class TObjectName extends TParseTreeNode implements Cloneable
The qualified or unqualified name that identifies a database object. The qualified name may includes those parts: server,database,schema,object,part and dblink. This class represents database object in different database vendors such as Oracle, SQL Server in a uniform way.

The general syntax of database object in Oracle: [schema.]object[.part][@dblink]

The general syntax of database object in SQL Server: [server.][database.][schema.]object

The meaning of getObjectToken() and getPartToken() depends on the getDbObjectType(). If this database object is a schema object such as table, index, then the objectToken represents this database object and partToken is null.

If this TObjectName represents a column, the partToken represents the column name, the objectToken is table/view name of this column if this column is qualified like table.column, otherwise, the objectToken is null.

schemaToken, databaseToken, serverToken is the qualified part of a database object name. If this objectName represents a database name in the create database statement like this CREATE DATABASE menagerie, then, the objectToken is menagerie and databaseToken is null.

See Also: