Package adql.db
Interface DBColumn
- All Known Implementing Classes:
DBCommonColumn
,DefaultDBColumn
public interface DBColumn
Definition of a valid target column.
This column can be used in an ADQL query with its ADQL name
(getADQLName()
) and corresponds to a real column in the "database"
with its DB name (getDBName()
).
-
Method Summary
Modifier and TypeMethodDescriptionMakes a copy of this instance ofDBColumn
.Gets the name of this column.Get the type of this column (as closed as possible from the "database" type).Gets the name of this column in the "database" (e.g.getTable()
Gets the table which contains thisDBColumn
.boolean
Tell whether the column name used in ADQL queries must be delimited (i.e.
-
Method Details
-
getADQLName
String getADQLName()Gets the name of this column.Notes: The returned ADQL name is:
- non-empty/NULL
- non-delimited (i.e. not between double quotes),
- non-prefixed (i.e. no table/schema/catalog name)
- and in the same case as provided at initialization (even if not case sensitive).
- Returns:
- Its ADQL name.
-
isCaseSensitive
boolean isCaseSensitive()Tell whether the column name used in ADQL queries must be delimited (i.e. surrounded by"
). In such case, it will be case sensitive.- Returns:
true
if the ADQL column name is case sensitive,false
otherwise.- Since:
- 2.0
-
getDBName
String getDBName()Gets the name of this column in the "database" (e.g. as it should be used in SQL queries).Notes The returned DB name is:
- non-empty/NULL
- non-delimited (i.e. not between double quotes),
- non-prefixed (i.e. no table/schema/catalog name)
- and in the EXACT case as it MUST be used.
- Returns:
- Its DB name.
-
getDatatype
DBType getDatatype()Get the type of this column (as closed as possible from the "database" type).Note: The returned type should be as closed as possible from a type listed by the IVOA in the TAP protocol description into the section UPLOAD.
- Returns:
- Its type.
- Since:
- 1.3
-
getTable
DBTable getTable()Gets the table which contains thisDBColumn
.- Returns:
- Its table or NULL if no table is specified.
-
copy
Makes a copy of this instance ofDBColumn
.- Parameters:
dbName
- Its new DB name.adqlName
- Its new ADQL name.dbTable
- Its new table.- Returns:
- A modified copy of this
DBColumn
.
-