Codota Logo
AbstractJdbc2ResultSet.checkColumnIndex
Code IndexAdd Codota to your IDE (free)

How to use
checkColumnIndex
method
in
org.postgresql.jdbc2.AbstractJdbc2ResultSet

Best Java code snippets using org.postgresql.jdbc2.AbstractJdbc2ResultSet.checkColumnIndex (Showing top 9 results out of 315)

  • Common ways to obtain AbstractJdbc2ResultSet
private void myMethod () {
AbstractJdbc2ResultSet a =
  • Codota IconPreparedStatement preparedStatement;(AbstractJdbc2ResultSet) preparedStatement.executeQuery()
  • Smart code suggestions by Codota
}
origin: postgresql/postgresql

/**
 * Checks that the result set is not closed, it's positioned on a
 * valid row and that the given column number is valid. Also
 * updates the {@link #wasNullFlag} to correct value.
 * 
 * @param column The column number to check. Range starts from 1.
 * @throws SQLException If state or column is invalid.
 */
protected void checkResultSet( int column ) throws SQLException
{
  checkClosed();
  if ( this_row == null )
    throw new PSQLException(GT.tr("ResultSet not positioned properly, perhaps you need to call next."),
                PSQLState.INVALID_CURSOR_STATE);
  checkColumnIndex(column);
  wasNullFlag = (this_row[column - 1] == null);
}
origin: postgresql/postgresql

public synchronized void updateNull(int columnIndex)
throws SQLException
{
  checkColumnIndex(columnIndex);
  String columnTypeName = connection.getTypeInfo().getPGType(fields[columnIndex - 1].getOID());
  updateValue(columnIndex, new NullObject(columnTypeName));
}
origin: postgresql/postgresql

protected void updateValue(int columnIndex, Object value) throws SQLException {
  checkUpdateable();
  if (!onInsertRow && (isBeforeFirst() || isAfterLast() || rows.size() == 0))
  {
    throw new PSQLException(GT.tr("Cannot update the ResultSet because it is either before the start or after the end of the results."),
                PSQLState.INVALID_CURSOR_STATE);
  }
  checkColumnIndex(columnIndex);
  doingUpdates = !onInsertRow;
  if (value == null) {
    updateNull(columnIndex);
  } else {
    PGResultSetMetaData md = (PGResultSetMetaData)getMetaData();
    updateValues.put(md.getBaseColumnName(columnIndex), value);
  }
}
origin: org.ancoron.postgresql/org.postgresql

/**
 * Checks that the result set is not closed, it's positioned on a
 * valid row and that the given column number is valid. Also
 * updates the {@link #wasNullFlag} to correct value.
 * 
 * @param column The column number to check. Range starts from 1.
 * @throws SQLException If state or column is invalid.
 */
protected void checkResultSet( int column ) throws SQLException
{
  checkClosed();
  if ( this_row == null )
    throw new PSQLException(GT.tr("ResultSet not positioned properly, perhaps you need to call next."),
                PSQLState.INVALID_CURSOR_STATE);
  checkColumnIndex(column);
  wasNullFlag = (this_row[column - 1] == null);
}
origin: org.ancoron.postgresql/org.postgresql.osgi

/**
 * Checks that the result set is not closed, it's positioned on a
 * valid row and that the given column number is valid. Also
 * updates the {@link #wasNullFlag} to correct value.
 * 
 * @param column The column number to check. Range starts from 1.
 * @throws SQLException If state or column is invalid.
 */
protected void checkResultSet( int column ) throws SQLException
{
  checkClosed();
  if ( this_row == null )
    throw new PSQLException(GT.tr("ResultSet not positioned properly, perhaps you need to call next."),
                PSQLState.INVALID_CURSOR_STATE);
  checkColumnIndex(column);
  wasNullFlag = (this_row[column - 1] == null);
}
origin: org.ancoron.postgresql/org.postgresql.osgi

protected void updateValue(int columnIndex, Object value) throws SQLException {
  checkUpdateable();
  if (!onInsertRow && (isBeforeFirst() || isAfterLast() || rows.size() == 0))
  {
    throw new PSQLException(GT.tr("Cannot update the ResultSet because it is either before the start or after the end of the results."),
                PSQLState.INVALID_CURSOR_STATE);
  }
  checkColumnIndex(columnIndex);
  doingUpdates = !onInsertRow;
  if (value == null)
    updateNull(columnIndex);
  else
    updateValues.put(fields[columnIndex - 1].getColumnName(connection), value);
}
origin: org.ancoron.postgresql/org.postgresql

protected void updateValue(int columnIndex, Object value) throws SQLException {
  checkUpdateable();
  if (!onInsertRow && (isBeforeFirst() || isAfterLast() || rows.size() == 0))
  {
    throw new PSQLException(GT.tr("Cannot update the ResultSet because it is either before the start or after the end of the results."),
                PSQLState.INVALID_CURSOR_STATE);
  }
  checkColumnIndex(columnIndex);
  doingUpdates = !onInsertRow;
  if (value == null) {
    updateNull(columnIndex);
  } else {
    PGResultSetMetaData md = (PGResultSetMetaData)getMetaData();
    updateValues.put(md.getBaseColumnName(columnIndex), value);
  }
}
origin: org.ancoron.postgresql/org.postgresql

public synchronized void updateNull(int columnIndex)
throws SQLException
{
  checkColumnIndex(columnIndex);
  String columnTypeName = connection.getTypeInfo().getPGType(fields[columnIndex - 1].getOID());
  updateValue(columnIndex, new NullObject(columnTypeName));
}
origin: org.ancoron.postgresql/org.postgresql.osgi

public synchronized void updateNull(int columnIndex)
throws SQLException
{
  checkColumnIndex(columnIndex);
  String columnTypeName = connection.getTypeInfo().getPGType(fields[columnIndex - 1].getOID());
  updateValue(columnIndex, new NullObject(columnTypeName));
}
org.postgresql.jdbc2AbstractJdbc2ResultSetcheckColumnIndex

Popular methods of AbstractJdbc2ResultSet

  • absolute
  • addWarning
  • afterLast
  • beforeFirst
  • checkClosed
  • checkResultSet
    Checks that the result set is not closed, it's positioned on a valid row and that the given column n
  • checkScrollable
  • checkUpdateable
  • clearRowBuffer
  • close
  • createArray
  • findColumn
  • createArray,
  • findColumn,
  • findColumnIndex,
  • getArray,
  • getAsciiStream,
  • getBigDecimal,
  • getBinaryStream,
  • getBlob,
  • getBoolean

Popular in Java

  • Reading from database using SQL prepared statement
  • setScale (BigDecimal)
  • requestLocationUpdates (LocationManager)
  • findViewById (Activity)
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • LinkedHashMap (java.util)
    Hash table and linked list implementation of the Map interface, with predictable iteration order. Th
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Collectors (java.util.stream)
  • Table (org.hibernate.mapping)
    A relational table
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now