Codota Logo
ResultWrapper
Code IndexAdd Codota to your IDE (free)

How to use
ResultWrapper
in
org.postgresql.jdbc2

Best Java code snippets using org.postgresql.jdbc2.ResultWrapper (Showing top 20 results out of 315)

  • Common ways to obtain ResultWrapper
private void myMethod () {
ResultWrapper r =
  • Codota IconAbstractJdbc2Statement.StatementResultHandler abstractJdbc2StatementStatementResultHandler;abstractJdbc2StatementStatementResultHandler.getResults()
  • Smart code suggestions by Codota
}
origin: postgresql/postgresql

public void handleCommandStatus(String status, int updateCount, long insertOID) {
  append(new ResultWrapper(updateCount, insertOID));
}
origin: postgresql/postgresql

private void append(ResultWrapper newResult) {
  if (results == null)
    results = newResult;
  else
    results.append(newResult);
}
origin: postgresql/postgresql

public long getLastOID() throws SQLException
{
  checkClosed();
  if (result == null)
    return 0;
  return result.getInsertOID();
}
origin: postgresql/postgresql

public boolean getMoreResults() throws SQLException
{
  if (result == null)
    return false;
  result = result.getNext();
  // Close preceding resultsets.
  while (firstUnclosedResult != result)
  {
    if (firstUnclosedResult.getResultSet() != null)
      firstUnclosedResult.getResultSet().close();
    firstUnclosedResult = firstUnclosedResult.getNext();
  }
  return (result != null && result.getResultSet() != null);
}
origin: postgresql/postgresql

public int getUpdateCount() throws SQLException
{
  checkClosed();
  if (result == null || result.getResultSet() != null)
    return -1;
  return result.getUpdateCount();
}
origin: postgresql/postgresql

public java.sql.ResultSet getResultSet() throws SQLException
{
  checkClosed();
  if (result == null)
    return null;
  return (ResultSet) result.getResultSet();
}
origin: postgresql/postgresql

result = result.getNext();
origin: postgresql/postgresql

if (current == Statement.CLOSE_CURRENT_RESULT && result != null && result.getResultSet() != null)
  result.getResultSet().close();
  result = result.getNext();
    if (firstUnclosedResult.getResultSet() != null)
      firstUnclosedResult.getResultSet().close();
    firstUnclosedResult = firstUnclosedResult.getNext();
return (result != null && result.getResultSet() != null);
origin: postgresql/postgresql

/**
 * Retrieves any auto-generated keys created as a result of executing this
 * <code>Statement</code> object. If this <code>Statement</code> object did
 * not generate any keys, an empty <code>ResultSet</code>
 * object is returned.
 *
 * @return a <code>ResultSet</code> object containing the auto-generated key(s)
 *     generated by the execution of this <code>Statement</code> object
 * @exception SQLException if a database access error occurs
 * @since 1.4
 */
public ResultSet getGeneratedKeys() throws SQLException
{
  checkClosed();
  if (generatedKeys == null || generatedKeys.getResultSet() == null)
    return createDriverResultSet(new Field[0], new Vector());
  return generatedKeys.getResultSet();
}
origin: org.ancoron.postgresql/org.postgresql.osgi

public int getUpdateCount() throws SQLException
{
  checkClosed();
  if (result == null || result.getResultSet() != null)
    return -1;
  return result.getUpdateCount();
}
origin: org.ancoron.postgresql/org.postgresql

result = result.getNext();
origin: postgresql/postgresql

protected void closeForNextExecution() throws SQLException {
  // Every statement execution clears any previous warnings.
  clearWarnings();
  // Close any existing resultsets associated with this statement.
  while (firstUnclosedResult != null)
  {
    if (firstUnclosedResult.getResultSet() != null)
      firstUnclosedResult.getResultSet().close();
    firstUnclosedResult = firstUnclosedResult.getNext();
  }
  result = null;
  if (lastSimpleQuery != null) {
    lastSimpleQuery.close();
    lastSimpleQuery = null;
  }
  if (generatedKeys != null) {
    if (generatedKeys.getResultSet() != null) {
      generatedKeys.getResultSet().close();
    }
    generatedKeys = null;
  }
}
origin: postgresql/postgresql

  if (result == null || result.getResultSet() == null)
    throw new PSQLException(GT.tr("A CallableStatement was executed with nothing returned."), PSQLState.NO_DATA);
  ResultSet rs = result.getResultSet();
  if (!rs.next())
    throw new PSQLException(GT.tr("A CallableStatement was executed with nothing returned."), PSQLState.NO_DATA);
return (result != null && result.getResultSet() != null);
origin: org.ancoron.postgresql/org.postgresql

public int getUpdateCount() throws SQLException
{
  checkClosed();
  if (result == null || result.getResultSet() != null)
    return -1;
  return result.getUpdateCount();
}
origin: postgresql/postgresql

public void handleResultRows(Query fromQuery, Field[] fields, Vector tuples, ResultCursor cursor) {
  try
  {
    ResultSet rs = AbstractJdbc2Statement.this.createResultSet(fromQuery, fields, tuples, cursor);
    append(new ResultWrapper(rs));
  }
  catch (SQLException e)
  {
    handleError(e);
  }
}
origin: postgresql/postgresql

public int getInsertedOID() throws SQLException
{
  checkClosed();
  if (result == null)
    return 0;
  return (int) result.getInsertOID();
}
origin: org.ancoron.postgresql/org.postgresql

private void append(ResultWrapper newResult) {
  if (results == null)
    results = newResult;
  else
    results.append(newResult);
}
origin: postgresql/postgresql

public java.sql.ResultSet executeQuery() throws SQLException
{
  if (!executeWithFlags(0))
    throw new PSQLException(GT.tr("No results were returned by the query."), PSQLState.NO_DATA);
  if (result.getNext() != null)
    throw new PSQLException(GT.tr("Multiple ResultSets were returned by the query."), PSQLState.TOO_MANY_RESULTS);
  return (ResultSet) result.getResultSet();
}
origin: postgresql/postgresql

public boolean executeWithFlags(String p_sql, int flags) throws SQLException
{
  checkClosed();
  p_sql = replaceProcessing(p_sql);
  Query simpleQuery = connection.getQueryExecutor().createSimpleQuery(p_sql);
  execute(simpleQuery, null, QueryExecutor.QUERY_ONESHOT | flags);
  this.lastSimpleQuery = simpleQuery;
  return (result != null && result.getResultSet() != null);
}
origin: postgresql/postgresql

generatedKeys = new ResultWrapper(((BatchResultHandler)handler).getGeneratedKeys());
org.postgresql.jdbc2ResultWrapper

Javadoc

Helper class that storing result info. This handles both the ResultSet and no-ResultSet result cases with a single interface for inspecting and stepping through them.

Most used methods

  • <init>
  • append
  • getInsertOID
  • getNext
  • getResultSet
  • getUpdateCount

Popular in Java

  • Making http requests using okhttp
  • getSharedPreferences (Context)
  • findViewById (Activity)
  • setContentView (Activity)
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Notification (javax.management)
  • DataSource (javax.sql)
    A factory for connections to the physical data source that this DataSource object represents. An alt
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
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