Tabnine Logo
DBLeasedSession.commit
Code IndexAdd Tabnine to your IDE (free)

How to use
commit
method
in
org.jetbrains.dekaf.core.DBLeasedSession

Best Java code snippets using org.jetbrains.dekaf.core.DBLeasedSession.commit (Showing top 3 results out of 315)

origin: JetBrains/dekaf

@Override
public void commit() {
 checkIsNotClosed();
 myOriginalSession.commit();
}
origin: JetBrains/dekaf

@Test
public void isInTransaction_begin_commit() {
 final DBLeasedSession session = myFacade.leaseSession();
 try {
  assertThat(session.isInTransaction()).isFalse();
  session.beginTransaction();
  assertThat(session.isInTransaction()).isTrue();
  session.commit();
  assertThat(session.isInTransaction()).isFalse();
 }
 finally {
  session.close();
 }
}
origin: JetBrains/dekaf

@Test
public void transaction_commit() {
 TH.ensureNoTableOrView("Tab_1");
 TH.performCommand("create table Tab_1 (C1 char(1))");
 TH.performCommand("insert into Tab_1 values ('A')");
 DBLeasedSession session = DB.leaseSession();
 try {
  assertThat(TH.countTableRows(session, "Tab_1")).isEqualTo(1);
  session.beginTransaction();
  session.command("insert into Tab_1 values ('B')").run();
  assertThat(TH.countTableRows(session, "Tab_1")).isEqualTo(2);
  session.commit();
  assertThat(TH.countTableRows(session, "Tab_1")).isEqualTo(2);
 }
 finally {
  session.close();
 }
}
org.jetbrains.dekaf.coreDBLeasedSessioncommit

Popular methods of DBLeasedSession

  • beginTransaction
  • close
    Closes the session. When session is already closed, just does nothing.
  • ping
    Checks whether the session is really alive. If the check is successful, just returns the ping durati
  • rollback
  • command
  • isClosed
    Check whether the session is closed.
  • isInTransaction
  • getSpecificService
  • inTransaction
  • query
  • script
  • script

Popular in Java

  • Finding current android device location
  • setContentView (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • setScale (BigDecimal)
  • Menu (java.awt)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • JTable (javax.swing)
  • Runner (org.openjdk.jmh.runner)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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