Skip to content

Commit

Permalink
Merge pull request ScorpioBroker#562 from alifrugal/alifrugal
Browse files Browse the repository at this point in the history
fixing getType SQL query adding as in queryDAO
  • Loading branch information
ScorpioBroker authored Jun 21, 2024
2 parents 68995fa + 6acffde commit d581e6d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public Uni<RowSet<Row>> queryLocalOnly(String tenantId, String[] ids, TypeQueryT
public Uni<Map<String, Object>> getTypes(String tenantId) {
return clientManager.getClient(tenantId, false).onItem().transformToUni(client -> {
return client
.preparedQuery("SELECT DISTINCT myTypes from (SELECT to_jsonb(unnest(e_types)) as myTypes from entity UNION ALL SELECT to_jsonb(e_type) as myTypes from csourceinformation);")
.preparedQuery("SELECT DISTINCT myTypes from (SELECT to_jsonb(unnest(e_types)) as myTypes from entity UNION ALL SELECT to_jsonb(e_type) as myTypes from csourceinformation) as NA;")
.execute().onItem().transform(rows -> {
Map<String, Object> result = Maps.newHashMap();
result.put(NGSIConstants.JSON_LD_TYPE, Lists.newArrayList(NGSIConstants.NGSI_LD_ENTITY_LIST));
Expand Down

0 comments on commit d581e6d

Please sign in to comment.