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

com::mysql::jdbc::ResultSet::ResultSet ( String  catalog,
Field[]  fields,
RowData  tuples,
Connection  conn,
Statement  creatorStmt 
) throws SQLException [inline]

Creates a new ResultSet object.

Parameters:
catalog the database in use when we were created
fields an array of Field objects (basically, the ResultSet MetaData)
tuples actual row data
conn the Connection that created us.
creatorStmt DOCUMENT ME!
Exceptions:
SQLException if an error occurs

Definition at line 270 of file ResultSet.java.

References catalog, com::mysql::jdbc::RowData::close(), columnUsed, connection, fields, com::mysql::jdbc::Connection::getDefaultTimeZone(), com::mysql::jdbc::profiler::ProfileEventSink::getInstance(), com::mysql::jdbc::ConnectionProperties::getProfileSql(), com::mysql::jdbc::ConnectionProperties::getStrictFloatingPoint(), com::mysql::jdbc::ConnectionProperties::getUseUsageAdvisor(), com::mysql::jdbc::Field::length, owningStatement, pointOfOrigin, profileSql, reallyResult, resultCounter, resultId, rowData, com::mysql::jdbc::RowData::setOwner(), com::mysql::jdbc::RowData::size(), thisRow, and updateCount.

                                                                    {
        this.connection = conn;

        if (this.connection != null) {
            this.useStrictFloatingPoint = this.connection.getStrictFloatingPoint();
            this.setDefaultTimeZone(this.connection.getDefaultTimeZone());
        }

        this.owningStatement = creatorStmt;

        this.catalog = catalog;
        this.profileSql = this.connection.getProfileSql();

        this.fields = fields;
        this.rowData = tuples;
        this.updateCount = this.rowData.size();

        if (Driver.DEBUG) {
            System.out.println(Messages.getString("ResultSet.Retrieved__1") +
                        this.updateCount + " rows"); //$NON-NLS-1$
        }

        this.reallyResult = true;

        // Check for no results
        if (this.rowData.size() > 0) {
            if (this.updateCount == 1) {
                if (this.thisRow == null) {
                    this.rowData.close(); // empty result set
                    this.updateCount = -1;
                }
            }
        } else {
            this.thisRow = null;
        }

        this.rowData.setOwner(this);

        if (this.profileSql || this.connection.getUseUsageAdvisor()) {
            this.columnUsed = new boolean[this.fields.length];
            this.pointOfOrigin = new Throwable();
            this.resultId = resultCounter++;
            this.useUsageAdvisor = this.connection.getUseUsageAdvisor();
            this.eventSink = ProfileEventSink.getInstance(this.connection);
        }
    }


Generated by  Doxygen 1.6.0   Back to index