Class PreparedDbProvider


  • public class PreparedDbProvider
    extends Object
    • Method Detail

      • createDatabase

        public String createDatabase()
                              throws SQLException
        Create a new database, and return it as a JDBC connection string. NB: No two invocations will return the same database.
        Returns:
        JDBC connection string.
        Throws:
        SQLException - SQLException if any
      • createDataSourceFromConnectionInfo

        public DataSource createDataSourceFromConnectionInfo​(ConnectionInfo connectionInfo)
        Create a new Datasource given DBInfo. More common usage is to call createDatasource().
        Parameters:
        connectionInfo - connection information
        Returns:
        Datasource
      • createDataSource

        public DataSource createDataSource()
                                    throws SQLException
        Create a new database, and return it as a DataSource. No two invocations will return the same database.
        Returns:
        Datasource the datasource
        Throws:
        SQLException - SQLException if any
      • getConfigurationTweak

        public Map<String,​String> getConfigurationTweak​(String dbModuleName)
                                                       throws SQLException
        Return configuration tweaks in a format appropriate for otj-jdbc DatabaseModule.
        Parameters:
        dbModuleName - Name of the module
        Returns:
        Configuration properties
        Throws:
        SQLException - SQLException if any