Commit 385482f374b493a21db739f460d9a23e6ed85600

Authored by Jean-Michel Glorian
1 parent 666f06f9
Exists in master

Possibility to define the returnable parameters

src/main/java/eu/omp/irap/vespa/epntapclient/service/Queries.java
... ... @@ -28,6 +28,8 @@ import eu.omp.irap.vespa.votable.utils.StringJoiner;
28 28 * @author N. Jourdane
29 29 */
30 30 public final class Queries {
  31 +
  32 + public static String RETURN_PARAMETERS = "target_name, target_class";
31 33  
32 34 private static final String SELECT = "SELECT DISTINCT short_name, res_title, "
33 35 + "table_name, schema_name, ivoid, access_url ";
... ... @@ -113,7 +115,11 @@ public final class Queries {
113 115 }
114 116 }
115 117 String where = addJoin.isEmpty() ? "" : " WHERE " + addJoin;
116   - return "SELECT TOP " + nbRow + " target_name, target_class FROM " + tableName + where;
  118 +
  119 + return "SELECT TOP " + nbRow + " "
  120 + + RETURN_PARAMETERS
  121 + + " "
  122 + + "FROM " + tableName + where;
117 123 }
118 124  
119 125 }
... ...