Tabnine Logo
BaseStatement.getUpdateCount
Code IndexAdd Tabnine to your IDE (free)

How to use
getUpdateCount
method
in
org.postgresql.core.BaseStatement

Best Java code snippets using org.postgresql.core.BaseStatement.getUpdateCount (Showing top 4 results out of 315)

origin: postgresql/postgresql

/**
 * Simple query execution.
 */
public ResultSet execSQLQuery(String s, int resultSetType, int resultSetConcurrency) throws SQLException {
  BaseStatement stat = (BaseStatement) createStatement(resultSetType, resultSetConcurrency);
  boolean hasResultSet = stat.executeWithFlags(s, QueryExecutor.QUERY_SUPPRESS_BEGIN);
  while (!hasResultSet && stat.getUpdateCount() != -1)
    hasResultSet = stat.getMoreResults();
  if (!hasResultSet)
    throw new PSQLException(GT.tr("No results were returned by the query."), PSQLState.NO_DATA);
  // Transfer warnings to the connection, since the user never
  // has a chance to see the statement itself.
  SQLWarning warnings = stat.getWarnings();
  if (warnings != null)
    addWarning(warnings);
  return stat.getResultSet();
}
origin: org.postgresql/postgresql

@Override
public ResultSet execSQLQuery(String s, int resultSetType, int resultSetConcurrency)
  throws SQLException {
 BaseStatement stat = (BaseStatement) createStatement(resultSetType, resultSetConcurrency);
 boolean hasResultSet = stat.executeWithFlags(s, QueryExecutor.QUERY_SUPPRESS_BEGIN);
 while (!hasResultSet && stat.getUpdateCount() != -1) {
  hasResultSet = stat.getMoreResults();
 }
 if (!hasResultSet) {
  throw new PSQLException(GT.tr("No results were returned by the query."), PSQLState.NO_DATA);
 }
 // Transfer warnings to the connection, since the user never
 // has a chance to see the statement itself.
 SQLWarning warnings = stat.getWarnings();
 if (warnings != null) {
  addWarning(warnings);
 }
 return stat.getResultSet();
}
origin: org.ancoron.postgresql/org.postgresql

/**
 * Simple query execution.
 */
public ResultSet execSQLQuery(String s, int resultSetType, int resultSetConcurrency) throws SQLException {
  BaseStatement stat = (BaseStatement) createStatement(resultSetType, resultSetConcurrency);
  boolean hasResultSet = stat.executeWithFlags(s, QueryExecutor.QUERY_SUPPRESS_BEGIN);
  while (!hasResultSet && stat.getUpdateCount() != -1)
    hasResultSet = stat.getMoreResults();
  if (!hasResultSet)
    throw new PSQLException(GT.tr("No results were returned by the query."), PSQLState.NO_DATA);
  // Transfer warnings to the connection, since the user never
  // has a chance to see the statement itself.
  SQLWarning warnings = stat.getWarnings();
  if (warnings != null)
    addWarning(warnings);
  return stat.getResultSet();
}
origin: org.ancoron.postgresql/org.postgresql.osgi

/**
 * Simple query execution.
 */
public ResultSet execSQLQuery(String s, int resultSetType, int resultSetConcurrency) throws SQLException {
  BaseStatement stat = (BaseStatement) createStatement(resultSetType, resultSetConcurrency);
  boolean hasResultSet = stat.executeWithFlags(s, QueryExecutor.QUERY_SUPPRESS_BEGIN);
  while (!hasResultSet && stat.getUpdateCount() != -1)
    hasResultSet = stat.getMoreResults();
  if (!hasResultSet)
    throw new PSQLException(GT.tr("No results were returned by the query."), PSQLState.NO_DATA);
  // Transfer warnings to the connection, since the user never
  // has a chance to see the statement itself.
  SQLWarning warnings = stat.getWarnings();
  if (warnings != null)
    addWarning(warnings);
  return stat.getResultSet();
}
org.postgresql.coreBaseStatementgetUpdateCount

Popular methods of BaseStatement

  • close
  • createDriverResultSet
    Create a synthetic resultset from data provided by the driver.
  • executeWithFlags
    Execute a query, passing additional query flags.
  • getConnection
  • getMoreResults
  • getResultSet
  • getWarnings

Popular in Java

  • Reading from database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • getApplicationContext (Context)
  • getContentResolver (Context)
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Path (java.nio.file)
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now