diff --git a/fda-query-service/services/src/main/java/at/tuwien/mapper/QueryMapper.java b/fda-query-service/services/src/main/java/at/tuwien/mapper/QueryMapper.java index 71b11475f3e852ba7102224c3d65aed0a7c294e3..12fb0c95f304ba3b3096496831eb316c2de0c127 100644 --- a/fda-query-service/services/src/main/java/at/tuwien/mapper/QueryMapper.java +++ b/fda-query-service/services/src/main/java/at/tuwien/mapper/QueryMapper.java @@ -450,7 +450,7 @@ public interface QueryMapper { default PreparedStatement tableCsvDtoToRawDeleteQuery(Connection connection, Table table, TableCsvDeleteDto data) throws TableMalformedException, ImageNotSupportedException, QueryMalformedException { - log.debug("table csv to delete query, table={}, data={}", table, data); + log.trace("table csv to delete query, table={}, data={}", table, data); int i = 1; if (table.getColumns().size() == 0) { log.error("Column size is zero"); @@ -497,7 +497,7 @@ public interface QueryMapper { default PreparedStatement tableCsvDtoToRawUpdateQuery(Connection connection, Table table, TableCsvUpdateDto data) throws TableMalformedException, ImageNotSupportedException, QueryMalformedException { - log.debug("mapping table csv to update query, table={}, data={}", table, data); + log.trace("mapping table csv to update query, table={}, data={}", table, data); int i = 1; if (table.getColumns().size() == 0) { log.error("Column size is zero"); @@ -570,7 +570,7 @@ public interface QueryMapper { default PreparedStatement tableToRawCountAllQuery(Connection connection, Table table, Instant timestamp) throws ImageNotSupportedException, QueryMalformedException { - log.debug("mapping table to raw count query, table={}, timestamp={}", table, timestamp); + log.trace("mapping table to raw count query, table={}, timestamp={}", table, timestamp); /* check image */ if (!table.getDatabase().getContainer().getImage().getRepository().equals("mariadb")) { log.error("Currently only MariaDB is supported"); @@ -599,7 +599,7 @@ public interface QueryMapper { Instant timestamp, Boolean selection, Long page, Long size) throws ImageNotSupportedException, QueryMalformedException { - log.debug("mapping query to timestamped query, query={}, database={}, timestamp={}, selection={}, page={}, size={}", + log.trace("mapping query to timestamped query, query={}, database={}, timestamp={}, selection={}, page={}, size={}", query, database, timestamp, selection, page, size); /* param check */ if (!database.getContainer().getImage().getRepository().equals("mariadb")) { @@ -669,9 +669,8 @@ public interface QueryMapper { + "' "); } try { - final PreparedStatement pstmt = connection.prepareStatement(statement.toString()); - log.trace("mapped timestamped query {} to prepared statement {}", statement, pstmt); - return pstmt; + log.debug("mapped timestamped query: {}", statement); + return connection.prepareStatement(statement.toString()); } catch (SQLException e) { log.error("Failed to prepare statement {}, reason: {}", statement, e.getMessage()); throw new QueryMalformedException("Failed to prepare statement", e); @@ -680,7 +679,7 @@ public interface QueryMapper { default PreparedStatement tableToRawFindAllQuery(Connection connection, Table table, Instant timestamp, Long size, Long page) throws ImageNotSupportedException, QueryMalformedException { - log.debug("mapping table to find all query, table={}, timestamp={}, size={}, page={}", + log.trace("mapping table to find all query, table={}, timestamp={}, size={}, page={}", table, timestamp, size, page); /* param check */ if (!table.getDatabase().getContainer().getImage().getRepository().equals("mariadb")) { diff --git a/fda-query-service/services/src/main/java/at/tuwien/service/impl/QueryServiceImpl.java b/fda-query-service/services/src/main/java/at/tuwien/service/impl/QueryServiceImpl.java index e4a39ad338a2c5414f5dddfb91a500f5118b90e4..2b4ec0f8cbce7ba22c8bde59c58be5a1fcfd2cab 100644 --- a/fda-query-service/services/src/main/java/at/tuwien/service/impl/QueryServiceImpl.java +++ b/fda-query-service/services/src/main/java/at/tuwien/service/impl/QueryServiceImpl.java @@ -99,7 +99,7 @@ public class QueryServiceImpl extends HibernateConnector implements QueryService columns = parseColumns(query.getQuery(), database); } catch (JSQLParserException e) { log.error("Failed to map/parse columns: {}", e.getMessage()); - throw new ColumnParseException("Failed to map/parse columns", e); + throw new ColumnParseException(e.getMessage(), e); } final QueryResultDto dto; try { @@ -422,7 +422,7 @@ public class QueryServiceImpl extends HibernateConnector implements QueryService final String tableName = queryMapper.stringToEscapedString(fromItem.toString()); log.error("Table with name {} does not exist, available names: {}", tableName, database.getTables().stream().map(Table::getInternalName).collect(Collectors.toList())); - throw new JSQLParserException("Table does not exist"); + throw new JSQLParserException("Table " + tableName + " does not exist"); } } @@ -445,7 +445,7 @@ public class QueryServiceImpl extends HibernateConnector implements QueryService if (i) { log.error("Column {} does not exist, available columns are {}", item, allColumns.stream().map(TableColumn::getInternalName).collect(Collectors.toList())); - throw new JSQLParserException("Column does not exist"); + throw new JSQLParserException("Column " + item + " does not exist"); } } return columns; diff --git a/fda-query-service/services/src/main/java/at/tuwien/service/impl/StoreServiceImpl.java b/fda-query-service/services/src/main/java/at/tuwien/service/impl/StoreServiceImpl.java index 205e9d57797b5693394fcc8e75e8b83d50863033..98a558385b1db42affae7f047b4ba48dd48e74ea 100644 --- a/fda-query-service/services/src/main/java/at/tuwien/service/impl/StoreServiceImpl.java +++ b/fda-query-service/services/src/main/java/at/tuwien/service/impl/StoreServiceImpl.java @@ -145,7 +145,7 @@ public class StoreServiceImpl extends HibernateConnector implements StoreService final PreparedStatement preparedStatement = storeMapper.queryStoreRawInsertQuery(connection, query); final ResultSet resultSet = preparedStatement.executeQuery(); query.setId(storeMapper.resultSetToId(resultSet)); - log.error("Inserted query {} into the query store of database with id {}", query.getQuery(), databaseId); + log.info("Inserted query {} into the query store of database with id {}", query.getQuery(), databaseId); log.trace("inserted query {} into the query store of database {}", query, database); return query; } catch (SQLException e) { diff --git a/fda-ui/components/TableList.vue b/fda-ui/components/TableList.vue index b97fc336d51e0818dc24bc12099b7d961eed16ab..c9b01985509f9129d1804af8c269a5f5489f82f8 100644 --- a/fda-ui/components/TableList.vue +++ b/fda-ui/components/TableList.vue @@ -96,7 +96,7 @@ disable-sort :loading="loadingDetails" hide-default-footer - items-per-page="-1" + :items-per-page="-1" :headers="headers" :items="tableDetails.columns"> <template v-slot:item.is_null_allowed="{ item }">