Package org.helidb.txn

Examples of org.helidb.txn.Transaction.commit()


      Transaction txn = Transaction.startTransaction(false);
      try
      {
        db.insert(1, 10L);
        db.insert(2, 20L);
        txn.commit();

        txn = Transaction.startTransaction(false);
        db.update(1, 100L);
        db.update(2, 200L);
        txn.rollback();
View Full Code Here


      Transaction txn = Transaction.startTransaction(false);
      try
      {
        db.insert(1, 10L);
        db.insert(2, 20L);
        txn.commit();

        txn = Transaction.startTransaction(false);
        db.clear();
        txn.commit();
View Full Code Here

        db.insert(2, 20L);
        txn.commit();

        txn = Transaction.startTransaction(false);
        db.clear();
        txn.commit();

        txn = Transaction.startTransaction(true);
        assertEquals(0, db.size());
      }
      finally
View Full Code Here

      Transaction txn = Transaction.startTransaction(false);
      try
      {
        db.insert(1, 10L);
        db.insert(2, 20L);
        txn.commit();

        txn = Transaction.startTransaction(false);
        db.clear();
        db.insert(1, 100L);
        txn.rollback();
View Full Code Here

      Transaction txn = Transaction.startTransaction(false);
      try
      {
        db.insert(1, 10L);
        db.insert(2, 20L);
        txn.commit();

        txn = Transaction.startTransaction(false);
        db.delete(1);
        db.insert(3, 30L);
        txn.commit();
View Full Code Here

        txn.commit();

        txn = Transaction.startTransaction(false);
        db.delete(1);
        db.insert(3, 30L);
        txn.commit();

        txn = Transaction.startTransaction(false);
        db.compact();
        txn.commit();
View Full Code Here

        db.insert(3, 30L);
        txn.commit();

        txn = Transaction.startTransaction(false);
        db.compact();
        txn.commit();

        txn = Transaction.startTransaction(true);
        assertEquals(2, db.size());
        assertEquals(30L, db.get(3).longValue());
        assertEquals(20L, db.get(2).longValue());
View Full Code Here

      Transaction txn = Transaction.startTransaction(false);
      try
      {
        db.insert(1, 10L);
        db.insert(2, 20L);
        txn.commit();

        txn = Transaction.startTransaction(false);
        db.delete(1);
        db.insert(3, 30L);
        txn.commit();
View Full Code Here

        txn.commit();

        txn = Transaction.startTransaction(false);
        db.delete(1);
        db.insert(3, 30L);
        txn.commit();

        txn = Transaction.startTransaction(false);
        db.compact();
        txn.rollback();
View Full Code Here

      try
      {
        db.insert(1, 10L);
        db.insert(2, 20L);
        db.insert(3, 30L);
        txn.commit();

        txn = Transaction.startTransaction(false);
        db.delete(2);
        txn.commit();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.