Modifier and Type | Class and Description |
---|---|
static class |
EmbeddedDatabaseRule.Builder
A builder class that provides a fluent api for building DB rules
|
static class |
EmbeddedDatabaseRule.Engine |
Constructor and Description |
---|
EmbeddedDatabaseRule()
Standard constructor that is suitable if you don't need to do anything special
|
Modifier and Type | Method and Description |
---|---|
Statement |
apply(Statement base,
Description description) |
static EmbeddedDatabaseRule.Builder |
builder()
Creates a builder that enables you to use the fluent API when construction an EmbeddedDatabaseRule instance
|
Connection |
getConnection()
Gives access to the current H2 JDBC connection.
|
String |
getConnectionJdbcUrl()
Returns a JDBC url for connecting to the in-memory database created by this rule with all INIT params stripped
|
DataSource |
getDataSource()
To be used when you actually need is a DataSource
|
static EmbeddedDatabaseRule.Builder |
h2()
Creates a builder that enables you to use the fluent API to construct an
EmbeddedDatabaseRule using the H2 engine |
static EmbeddedDatabaseRule.Builder |
hsqldb()
Creates a builder that enables you to use the fluent PAI to consturct an
EmbeddedDatabaseRule using the HSQLDB engine |
boolean |
isAutoCommit() |
public EmbeddedDatabaseRule()
public static EmbeddedDatabaseRule.Builder builder()
public static EmbeddedDatabaseRule.Builder h2()
EmbeddedDatabaseRule
using the H2 engineEmbeddedDatabaseRule.Builder
instancepublic static EmbeddedDatabaseRule.Builder hsqldb()
EmbeddedDatabaseRule
using the HSQLDB engineEmbeddedDatabaseRule.Builder
instancepublic Connection getConnection()
public DataSource getDataSource()
public boolean isAutoCommit()
public String getConnectionJdbcUrl()
public Statement apply(Statement base, Description description)
Copyright © 2014—2018 Sondre Eikanger Kvalø. All rights reserved..