Skip to content

Commit

Permalink
Fixed query for actual data type for column (#5249)
Browse files Browse the repository at this point in the history
Fixed query for actual data type for column.
  • Loading branch information
MalloD12 committed Nov 21, 2023
1 parent 63deecb commit fe81812
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -516,11 +516,13 @@ private void determineActualDataTypes(List<CachedRow> returnList, String tableNa
//
StringBuilder selectStatement = new StringBuilder(
"SELECT TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = ?");
if(tableName != null) {
selectStatement.append(" AND TABLE_NAME = ?");
}
Connection underlyingConnection = ((JdbcConnection) database.getConnection()).getUnderlyingConnection();
PreparedStatement statement = underlyingConnection.prepareStatement(selectStatement.toString());
statement.setString(1, schemaName);
if (tableName != null) {
selectStatement.append(" AND TABLE_NAME = ?");
statement.setString(2, tableName);
}
try {
Expand Down

0 comments on commit fe81812

Please sign in to comment.