public class AdqlSyntax
extends uk.ac.starlink.table.jdbc.SqlSyntax
Modifier and Type | Field and Description |
---|---|
static java.lang.String[] |
ADQL_RESERVED
ADQL reserved words additional to the SQL92 set,
taken from the ADQL standard.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
characterLiteral(java.lang.String txt)
Returns ADQL text representing a character literal.
|
java.lang.String[] |
getCatalogSchemaTable(java.lang.String tableName)
Takes an ADQL
<table_name> token
and returns a 3-element array giving the catalog, schema and table
(delimited or regular) identifiers. |
static AdqlSyntax |
getInstance()
Returns the sole instance of this class.
|
boolean |
isAdqlColumnName(java.lang.String token)
Indicates whether the given token matches the ADQL
<column_name> production. |
boolean |
isAdqlDelimitedIdentifier(java.lang.String token)
Indicates whether the given token matches the ADQL
<delimited_identifier> production. |
boolean |
isAdqlTableName(java.lang.String token)
Indicates whether the given token matches the ADQL
<table_name> production. |
java.lang.String |
unquote(java.lang.String identifier)
Takes a regular-or-delimited-identifier and returns its raw form.
|
public static final java.lang.String[] ADQL_RESERVED
public boolean isAdqlDelimitedIdentifier(java.lang.String token)
<delimited_identifier>
production.token
- token to testpublic boolean isAdqlColumnName(java.lang.String token)
<column_name>
production.token
- token to testpublic boolean isAdqlTableName(java.lang.String token)
<table_name>
production.token
- token to testpublic java.lang.String[] getCatalogSchemaTable(java.lang.String tableName)
<table_name>
token
and returns a 3-element array giving the catalog, schema and table
(delimited or regular) identifiers.
For a non-null result, the input token must match the ADQL
<table_name>
production, which is the same
rule that TAP_SCHEMA table_name columns must follow, which
roughly means it's of the form [catalog.[schema.[table]]].
Either catalog alone, or both catalog and schema, may be null.
The return value is either a three-element array (with 1, 2 or 3
non-null elements) in case of a legal table_name input,
or null in case of an illegal table_name input.
tableName
- table_name stringpublic java.lang.String unquote(java.lang.String identifier)
identifier
- regular or delimited identifier, or nullpublic java.lang.String characterLiteral(java.lang.String txt)
txt
- raw textpublic static AdqlSyntax getInstance()
Copyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.