Codota Logo
AbstractJdbc3Connection.getAutoCommit
Code IndexAdd Codota to your IDE (free)

How to use
getAutoCommit
method
in
org.postgresql.jdbc3.AbstractJdbc3Connection

Best Java code snippets using org.postgresql.jdbc3.AbstractJdbc3Connection.getAutoCommit (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: postgresql/postgresql

/**
 * Creates a savepoint with the given name in the current transaction
 * and returns the new <code>Savepoint</code> object that represents it.
 *
 * @param name a <code>String</code> containing the name of the savepoint
 * @return the new <code>Savepoint</code> object
 * @exception SQLException if a database access error occurs
 *     or this <code>Connection</code> object is currently in
 *     auto-commit mode
 * @see Savepoint
 * @since 1.4
 */
public Savepoint setSavepoint(String name) throws SQLException
{
  checkClosed();
  if (!haveMinimumServerVersion("8.0"))
    throw new PSQLException(GT.tr("Server versions prior to 8.0 do not support savepoints."), PSQLState.NOT_IMPLEMENTED);
  if (getAutoCommit())
    throw new PSQLException(GT.tr("Cannot establish a savepoint in auto-commit mode."),
                PSQLState.NO_ACTIVE_SQL_TRANSACTION);
  PSQLSavepoint savepoint = new PSQLSavepoint(name);
  // Note we can't use execSQLUpdate because we don't want
  // to suppress BEGIN.
  Statement stmt = createStatement();
  stmt.executeUpdate("SAVEPOINT " + savepoint.getPGName());
  stmt.close();
  return savepoint;
}
origin: postgresql/postgresql

/**
 * Creates an unnamed savepoint in the current transaction and
 * returns the new <code>Savepoint</code> object that represents it.
 *
 * @return the new <code>Savepoint</code> object
 * @exception SQLException if a database access error occurs
 *     or this <code>Connection</code> object is currently in
 *     auto-commit mode
 * @see Savepoint
 * @since 1.4
 */
public Savepoint setSavepoint() throws SQLException
{
  checkClosed();
  if (!haveMinimumServerVersion("8.0"))
    throw new PSQLException(GT.tr("Server versions prior to 8.0 do not support savepoints."), PSQLState.NOT_IMPLEMENTED);
  if (getAutoCommit())
    throw new PSQLException(GT.tr("Cannot establish a savepoint in auto-commit mode."),
                PSQLState.NO_ACTIVE_SQL_TRANSACTION);
  PSQLSavepoint savepoint = new PSQLSavepoint(savepointId++);
  // Note we can't use execSQLUpdate because we don't want
  // to suppress BEGIN.
  Statement stmt = createStatement();
  stmt.executeUpdate("SAVEPOINT " + savepoint.getPGName());
  stmt.close();
  return savepoint;
}
origin: org.ancoron.postgresql/org.postgresql.osgi

/**
 * Creates a savepoint with the given name in the current transaction
 * and returns the new <code>Savepoint</code> object that represents it.
 *
 * @param name a <code>String</code> containing the name of the savepoint
 * @return the new <code>Savepoint</code> object
 * @exception SQLException if a database access error occurs
 *     or this <code>Connection</code> object is currently in
 *     auto-commit mode
 * @see Savepoint
 * @since 1.4
 */
public Savepoint setSavepoint(String name) throws SQLException
{
  if (!haveMinimumServerVersion("8.0"))
    throw new PSQLException(GT.tr("Server versions prior to 8.0 do not support savepoints."), PSQLState.NOT_IMPLEMENTED);
  if (getAutoCommit())
    throw new PSQLException(GT.tr("Cannot establish a savepoint in auto-commit mode."),
                PSQLState.NO_ACTIVE_SQL_TRANSACTION);
  PSQLSavepoint savepoint = new PSQLSavepoint(name);
  // Note we can't use execSQLUpdate because we don't want
  // to suppress BEGIN.
  Statement stmt = createStatement();
  stmt.executeUpdate("SAVEPOINT " + savepoint.getPGName());
  stmt.close();
  return savepoint;
}
origin: org.ancoron.postgresql/org.postgresql.osgi

/**
 * Creates an unnamed savepoint in the current transaction and
 * returns the new <code>Savepoint</code> object that represents it.
 *
 * @return the new <code>Savepoint</code> object
 * @exception SQLException if a database access error occurs
 *     or this <code>Connection</code> object is currently in
 *     auto-commit mode
 * @see Savepoint
 * @since 1.4
 */
public Savepoint setSavepoint() throws SQLException
{
  if (!haveMinimumServerVersion("8.0"))
    throw new PSQLException(GT.tr("Server versions prior to 8.0 do not support savepoints."), PSQLState.NOT_IMPLEMENTED);
  if (getAutoCommit())
    throw new PSQLException(GT.tr("Cannot establish a savepoint in auto-commit mode."),
                PSQLState.NO_ACTIVE_SQL_TRANSACTION);
  PSQLSavepoint savepoint = new PSQLSavepoint(savepointId++);
  // Note we can't use execSQLUpdate because we don't want
  // to suppress BEGIN.
  Statement stmt = createStatement();
  stmt.executeUpdate("SAVEPOINT " + savepoint.getPGName());
  stmt.close();
  return savepoint;
}
origin: org.ancoron.postgresql/org.postgresql

/**
 * Creates an unnamed savepoint in the current transaction and
 * returns the new <code>Savepoint</code> object that represents it.
 *
 * @return the new <code>Savepoint</code> object
 * @exception SQLException if a database access error occurs
 *     or this <code>Connection</code> object is currently in
 *     auto-commit mode
 * @see Savepoint
 * @since 1.4
 */
public Savepoint setSavepoint() throws SQLException
{
  checkClosed();
  if (!haveMinimumServerVersion("8.0"))
    throw new PSQLException(GT.tr("Server versions prior to 8.0 do not support savepoints."), PSQLState.NOT_IMPLEMENTED);
  if (getAutoCommit())
    throw new PSQLException(GT.tr("Cannot establish a savepoint in auto-commit mode."),
                PSQLState.NO_ACTIVE_SQL_TRANSACTION);
  PSQLSavepoint savepoint = new PSQLSavepoint(savepointId++);
  // Note we can't use execSQLUpdate because we don't want
  // to suppress BEGIN.
  Statement stmt = createStatement();
  stmt.executeUpdate("SAVEPOINT " + savepoint.getPGName());
  stmt.close();
  return savepoint;
}
origin: org.ancoron.postgresql/org.postgresql

/**
 * Creates a savepoint with the given name in the current transaction
 * and returns the new <code>Savepoint</code> object that represents it.
 *
 * @param name a <code>String</code> containing the name of the savepoint
 * @return the new <code>Savepoint</code> object
 * @exception SQLException if a database access error occurs
 *     or this <code>Connection</code> object is currently in
 *     auto-commit mode
 * @see Savepoint
 * @since 1.4
 */
public Savepoint setSavepoint(String name) throws SQLException
{
  checkClosed();
  if (!haveMinimumServerVersion("8.0"))
    throw new PSQLException(GT.tr("Server versions prior to 8.0 do not support savepoints."), PSQLState.NOT_IMPLEMENTED);
  if (getAutoCommit())
    throw new PSQLException(GT.tr("Cannot establish a savepoint in auto-commit mode."),
                PSQLState.NO_ACTIVE_SQL_TRANSACTION);
  PSQLSavepoint savepoint = new PSQLSavepoint(name);
  // Note we can't use execSQLUpdate because we don't want
  // to suppress BEGIN.
  Statement stmt = createStatement();
  stmt.executeUpdate("SAVEPOINT " + savepoint.getPGName());
  stmt.close();
  return savepoint;
}
org.postgresql.jdbc3AbstractJdbc3ConnectiongetAutoCommit

Popular methods of AbstractJdbc3Connection

  • createStatement
  • execSQLUpdate
  • getHoldability
    Retrieves the current holdability of ResultSet objects created using this Connection object.
  • haveMinimumServerVersion
  • prepareCall
  • prepareStatement
    Creates a default PreparedStatement object capable of returning the auto-generated keys designated b
  • checkClosed

Popular in Java

  • Finding current android device location
  • requestLocationUpdates (LocationManager)
  • getSystemService (Context)
  • findViewById (Activity)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
  • Notification (javax.management)
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