Package org.sql2o

Examples of org.sql2o.Connection.rollback()


        } finally {

            // always rollback, as this is only for tesing purposes.
            if (connection != null) {
                connection.rollback();
            }
        }


    }
View Full Code Here


            key = connection.createQuery(insertSql, true).executeUpdate().getKey(Long.class);
            assertThat(key, equalTo(2L));
        } finally {
            if (connection != null) {
                connection.rollback();
            }
        }
    }

    @Test
View Full Code Here

            key = connection.createQuery(insertSql, true).executeUpdate().getKey(Long.class);
            assertThat(key, equalTo(2L));
        } finally {
            if (connection != null) {
                connection.rollback();
            }
        }
    }

    @Test
View Full Code Here

            UUID fetchedUuid = connection.createQuery(selectSql).executeScalar(UUID.class);

            assertThat(fetchedUuid, is(equalTo(uuid)));
        } finally {
            if (connection != null) {
                connection.rollback();
            }
        }

    }
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.