diff --git a/src/adql/translator/JDBCTranslator.java b/src/adql/translator/JDBCTranslator.java index 8ecfae16b18837604480b62938bd3f529996995a..063299fc50daebd3a682748701781466c9c55ecf 100644 --- a/src/adql/translator/JDBCTranslator.java +++ b/src/adql/translator/JDBCTranslator.java @@ -896,7 +896,7 @@ public abstract class JDBCTranslator implements ADQLTranslator { * {@link #convertTypeFromDB(int, String, String, String[])}. So the value should always * be of the expected type and format. However, if it turns out that the type is wrong * and that the conversion is finally impossible, this function SHOULD throw a - * {@link tap.data.DataReadException}. + * {@link ParseException}. * </i></p> * * @param jdbcColValue A JDBC column value (returned by ResultSet.getObject(int)). diff --git a/src/adql/translator/MySQLTranslator.java b/src/adql/translator/MySQLTranslator.java index 91a45c71200fc61f18642b6d40372af91b93564b..9b25eca81a94f130e47d3d192cc80a5871ed9608 100644 --- a/src/adql/translator/MySQLTranslator.java +++ b/src/adql/translator/MySQLTranslator.java @@ -76,6 +76,21 @@ public class MySQLTranslator extends JDBCTranslator { caseSensitivity = 0x0F; } + /** + * Build a MySQLTranslator which always translates in SQL all identifiers + * (schema, table and column) in the specified case sensitivity ; in other + * words, schema, table and column names will all be surrounded or not by + * back-quotes in the SQL translation. + * + * @param allCaseSensitive <i>true</i> to translate all identifiers in a + * case sensitive manner + * (surrounded by back-quotes), + * <i>false</i> for case insensitivity. + */ + public MySQLTranslator(final boolean allCaseSensitive){ + caseSensitivity = allCaseSensitive ? (byte)0x0F : (byte)0x00; + } + /** * Build a MySQLTranslator which will always translate in SQL identifiers * with the defined case sensitivity. @@ -89,21 +104,6 @@ public class MySQLTranslator extends JDBCTranslator { * @param column <i>true</i> to translate column names with back-quotes * (case sensitive in the DBMS), <i>false</i> otherwise. */ - public MySQLTranslator(final boolean allCaseSensitive){ - caseSensitivity = allCaseSensitive ? (byte)0x0F : (byte)0x00; - } - - /** - * Build a MySQLTranslator which always translates in SQL all identifiers - * (schema, table and column) in the specified case sensitivity ; in other - * words, schema, table and column names will all be surrounded or not by - * back-quotes in the SQL translation. - * - * @param allCaseSensitive <i>true</i> to translate all identifiers in a - * case sensitive manner - * (surrounded by back-quotes), - * <i>false</i> for case insensitivity. - */ public MySQLTranslator(final boolean catalog, final boolean schema, final boolean table, final boolean column){ caseSensitivity = IdentifierField.CATALOG.setCaseSensitive(caseSensitivity, catalog); caseSensitivity = IdentifierField.SCHEMA.setCaseSensitive(caseSensitivity, schema);