public final class Databases
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static Database |
createFrom(java.lang.String driver,
java.lang.String url)
Create a pooled database named "default" with the given driver and url.
|
static Database |
createFrom(java.lang.String driver,
java.lang.String url,
java.util.Map<java.lang.String,? extends java.lang.Object> config)
Create a pooled database named "default" with the given configuration.
|
static Database |
createFrom(java.lang.String name,
java.lang.String driver,
java.lang.String url)
Create a pooled database with the given configuration.
|
static Database |
createFrom(java.lang.String name,
java.lang.String driver,
java.lang.String url,
java.util.Map<java.lang.String,? extends java.lang.Object> config)
Create a pooled database with the given configuration.
|
static Database |
inMemory()
Create an in-memory H2 database with name "default".
|
static Database |
inMemory(java.util.Map<java.lang.String,? extends java.lang.Object> config)
Create an in-memory H2 database with name "default".
|
static Database |
inMemory(java.lang.String name)
Create an in-memory H2 database.
|
static Database |
inMemory(java.lang.String name,
java.util.Map<java.lang.String,? extends java.lang.Object> config)
Create an in-memory H2 database.
|
static Database |
inMemory(java.lang.String name,
java.util.Map<java.lang.String,java.lang.String> urlOptions,
java.util.Map<java.lang.String,? extends java.lang.Object> config)
Create an in-memory H2 database.
|
static Database |
inMemory(java.lang.String name,
java.lang.String url,
java.util.Map<java.lang.String,? extends java.lang.Object> config)
Create an in-memory H2 database.
|
static Database |
inMemoryWith(java.lang.String k1,
java.lang.Object v1)
Create an in-memory H2 database with name "default" and with
extra configuration provided by the given entries.
|
static Database |
inMemoryWith(java.lang.String k1,
java.lang.Object v1,
java.lang.String k2,
java.lang.Object v2)
Create an in-memory H2 database with name "default" and with
extra configuration provided by the given entries.
|
static Database |
inMemoryWith(java.lang.String k1,
java.lang.Object v1,
java.lang.String k2,
java.lang.Object v2,
java.lang.String k3,
java.lang.Object v3)
Create an in-memory H2 database with name "default" and with
extra configuration provided by the given entries.
|
public static Database createFrom(java.lang.String name, java.lang.String driver, java.lang.String url, java.util.Map<java.lang.String,? extends java.lang.Object> config)
name
- the database namedriver
- the database driver classurl
- the database urlconfig
- a map of extra database configurationpublic static Database createFrom(java.lang.String name, java.lang.String driver, java.lang.String url)
name
- the database namedriver
- the database driver classurl
- the database urlpublic static Database createFrom(java.lang.String driver, java.lang.String url, java.util.Map<java.lang.String,? extends java.lang.Object> config)
driver
- the database driver classurl
- the database urlconfig
- a map of extra database configurationpublic static Database createFrom(java.lang.String driver, java.lang.String url)
driver
- the database driver classurl
- the database urlpublic static Database inMemory(java.lang.String name, java.lang.String url, java.util.Map<java.lang.String,? extends java.lang.Object> config)
name
- the database nameurl
- the database urlconfig
- a map of extra database configurationpublic static Database inMemory(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> urlOptions, java.util.Map<java.lang.String,? extends java.lang.Object> config)
name
- the database nameurlOptions
- a map of extra url optionsconfig
- a map of extra database configurationpublic static Database inMemory(java.lang.String name, java.util.Map<java.lang.String,? extends java.lang.Object> config)
name
- the database nameconfig
- a map of extra database configurationpublic static Database inMemory(java.lang.String name)
name
- the database namepublic static Database inMemory(java.util.Map<java.lang.String,? extends java.lang.Object> config)
config
- a map of extra database configurationpublic static Database inMemory()
public static Database inMemoryWith(java.lang.String k1, java.lang.Object v1)
public static Database inMemoryWith(java.lang.String k1, java.lang.Object v1, java.lang.String k2, java.lang.Object v2)
public static Database inMemoryWith(java.lang.String k1, java.lang.Object v1, java.lang.String k2, java.lang.Object v2, java.lang.String k3, java.lang.Object v3)