Esempio n. 1
0
 /**
  * Creates a new RowDataDynamic object.
  *
  * @param io the connection to MySQL that this data is coming from
  * @param metadata the metadata that describe this data
  * @param isBinaryEncoded is this data in native format?
  * @param colCount the number of columns
  * @throws SQLException if the next record can not be found
  */
 public RowDataDynamic(MysqlIO io, int colCount, Field[] fields, boolean isBinaryEncoded)
     throws SQLException {
   this.io = io;
   this.columnCount = colCount;
   this.isBinaryEncoded = isBinaryEncoded;
   this.metadata = fields;
   this.exceptionInterceptor = this.io.getExceptionInterceptor();
   this.useBufferRowExplicit = MysqlIO.useBufferRowExplicit(this.metadata);
 }
 /**
  * Creates a new cursor-backed row provider.
  *
  * @param ioChannel connection to the server.
  * @param creatingStatement statement that opened the cursor.
  * @param metadata field-level metadata for the results that this cursor covers.
  */
 public RowDataCursor(
     MysqlIO ioChannel, ServerPreparedStatement creatingStatement, Field[] metadata) {
   this.currentPositionInEntireResult = BEFORE_START_OF_ROWS;
   this.metadata = metadata;
   this.mysql = ioChannel;
   this.statementIdOnServer = creatingStatement.getServerStatementId();
   this.prepStmt = creatingStatement;
   this.useBufferRowExplicit = MysqlIO.useBufferRowExplicit(this.metadata);
 }