Skip to content
Snippets Groups Projects
Commit 09ee79c4 authored by gmantele's avatar gmantele
Browse files

[TAP] Fix the loading of columns when the column coosys_id exists.

parent 93c36a09
No related branches found
No related tags found
No related merge requests found
...@@ -201,6 +201,11 @@ public class JDBCConnection implements DBConnection { ...@@ -201,6 +201,11 @@ public class JDBCConnection implements DBConnection {
/** Name of the database column giving the database name of a TAP column, table or schema. */ /** Name of the database column giving the database name of a TAP column, table or schema. */
protected final static String DB_NAME_COLUMN = "dbname"; protected final static String DB_NAME_COLUMN = "dbname";
/** Name of the database column giving the coordinate system ID associated
* with a TAP column.
* @since 2.1 */
protected final static String COOSYS_ID_COLUMN = "dbname";
/** Connection ID (typically, the job ID). It lets identify the DB errors linked to the Job execution in the logs. */ /** Connection ID (typically, the job ID). It lets identify the DB errors linked to the Job execution in the logs. */
protected final String ID; protected final String ID;
...@@ -1302,8 +1307,10 @@ public class JDBCConnection implements DBConnection { ...@@ -1302,8 +1307,10 @@ public class JDBCConnection implements DBConnection {
sqlBuf.append(", "); sqlBuf.append(", ");
translator.appendIdentifier(sqlBuf, DB_NAME_COLUMN, IdentifierField.COLUMN); translator.appendIdentifier(sqlBuf, DB_NAME_COLUMN, IdentifierField.COLUMN);
} }
if (hasCoosys) if (hasCoosys){
sqlBuf.append(", ").append(translator.getColumnName(tableDef.getColumn("coosys_id"))); sqlBuf.append(", ");
translator.appendIdentifier(sqlBuf, COOSYS_ID_COLUMN, IdentifierField.COLUMN);
}
sqlBuf.append(" FROM ").append(translator.getTableName(tableDef, supportsSchema)); sqlBuf.append(" FROM ").append(translator.getTableName(tableDef, supportsSchema));
if (hasColumnIndex) if (hasColumnIndex)
sqlBuf.append(" ORDER BY 1,12,2"); sqlBuf.append(" ORDER BY 1,12,2");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment