/** * Create an in-memory H2 database. * * @param name the database name * @param url the database url * @param config a map of extra database configuration * @return a configured in-memory h2 database */ public static Database inMemory(String name, String url, Map<String, ? extends Object> config) { return createFrom(name, "org.h2.Driver", url, config); }
/** * Create a pooled database named "default" with the given configuration. * * @param driver the database driver class * @param url the database url * @param config a map of extra database configuration * @return a configured database */ public static Database createFrom(String driver, String url, Map<String, ? extends Object> config) { return createFrom("default", driver, url, config); }
/** * Create an in-memory H2 database. * * @param name the database name * @param url the database url * @param config a map of extra database configuration * @return a configured in-memory h2 database */ public static Database inMemory(String name, String url, Map<String, ? extends Object> config) { return createFrom(name, "org.h2.Driver", url, config); }
/** * Create a pooled database named "default" with the given configuration. * * @param driver the database driver class * @param url the database url * @param config a map of extra database configuration * @return a configured database */ public static Database createFrom(String driver, String url, Map<String, ? extends Object> config) { return createFrom("default", driver, url, config); }
/** * Create a pooled database with the given configuration. * * @param name the database name * @param driver the database driver class * @param url the database url * @return a configured database */ public static Database createFrom(String name, String driver, String url) { return createFrom(name, driver, url, ImmutableMap.<String, Object>of()); }
/** * Create a pooled database with the given configuration. * * @param name the database name * @param driver the database driver class * @param url the database url * @return a configured database */ public static Database createFrom(String name, String driver, String url) { return createFrom(name, driver, url, ImmutableMap.<String, Object>of()); }
/** * Create a pooled database named "default" with the given driver and url. * * @param driver the database driver class * @param url the database url * @return a configured database */ public static Database createFrom(String driver, String url) { return createFrom("default", driver, url, ImmutableMap.<String, Object>of()); }
/** * Create a pooled database named "default" with the given driver and url. * * @param driver the database driver class * @param url the database url * @return a configured database */ public static Database createFrom(String driver, String url) { return createFrom("default", driver, url, ImmutableMap.<String, Object>of()); }