public int getColumnDisplaySize()

in jdbc/src/main/java/software/amazon/timestream/jdbc/TimestreamResultSetMetaData.java [93:139]


  public int getColumnDisplaySize(int column) throws SQLException {
    verifyIndex(column);
    switch (getColumnType(column)) {
      case Types.BOOLEAN: {
        // False has 5 characters.
        return 5;
      }

      case Types.INTEGER: {
        return 11;
      }

      case Types.BIGINT: {
        return 20;
      }

      case Types.DOUBLE: {
        return 15;
      }

      case Types.DATE: {
        return 10;
      }

      case Types.TIME: {
        // Nanosecond precision.
        return 18;
      }

      case Types.TIMESTAMP: {
        // Nanosecond precision.
        return 29;
      }

      case Types.STRUCT:
      case Types.ARRAY:
      case Types.JAVA_OBJECT:
      case Types.VARCHAR: {
        return Integer.MAX_VALUE;
      }

      default: {
        throw new SQLFeatureNotSupportedException(
          Error.lookup(Error.UNSUPPORTED_TYPE, getColumnClassName(column)));
      }
    }
  }