Logo Search packages:      
Sourcecode: mysql-connector-java version File versions

void com::mysql::jdbc::ResultSet::issueConversionViaParsingWarning ( String  methodName,
int  columnIndex,
Object  value,
Field  fieldInfo,
int[]  typesWithNoParseConversion 
) [inline, private]

Parameters:
string 
mysqlType 
s 

Definition at line 4108 of file ResultSet.java.

References com::mysql::jdbc::Field::getMysqlType(), com::mysql::jdbc::Field::getOriginalName(), and com::mysql::jdbc::Field::getOriginalTableName().

                                                                                                                                                         {
            StringBuffer message = new StringBuffer();
            message.append("ResultSet type conversion via parsing detected when calling ");
            message.append(methodName);
            message.append(" for column ");
            message.append((columnIndex + 1));
            message.append(", (column named '");
            message.append(fieldInfo.getOriginalName());
            message.append("' in table '");
            message.append(fieldInfo.getOriginalTableName());
            if (this.owningStatement != null 
                        && this.owningStatement instanceof com.mysql.jdbc.PreparedStatement) {
            message.append("' created from query:\n\n");
            message.append(((com.mysql.jdbc.PreparedStatement)this.owningStatement).originalSql);
            message.append("\n\n");
            } else {
                  message.append(". ");
            }
            
            message.append("Java of column type is '");
            message.append(value.getClass().getName());
            message.append("', MySQL field type is ");
            message.append(MysqlDefs.typeToName(fieldInfo.getMysqlType()));
            message.append(".\n\nTypes that could be converted directly without parsing are:\n");
            
            for (int i = 0; i < typesWithNoParseConversion.length; i++) {
                  message.append(MysqlDefs.typeToName(typesWithNoParseConversion[i]));
                  message.append("\n");
            }
            
            this.eventSink.consumeEvent(new ProfilerEvent(
        ProfilerEvent.TYPE_WARN, "",
        (this.owningStatement == null) ? "N/A"
                                       : this.owningStatement.currentCatalog,
        this.connection.getId(),
        (this.owningStatement == null) ? (-1)
                                       : this.owningStatement.getId(),
        this.resultId, System.currentTimeMillis(), 0, null,
        this.pointOfOrigin, message.toString()));
            
      }


Generated by  Doxygen 1.6.0   Back to index