Class BloviateContainers.Builder

java.lang.Object
io.bloviate.testcontainers.BloviateContainers.Builder
Enclosing class:
BloviateContainers

public static final class BloviateContainers.Builder extends Object
Configures and runs a fill against a JdbcDatabaseContainer.
  • Method Details

    • batchSize

      public BloviateContainers.Builder batchSize(int batchSize)
      Sets the JDBC batch size for INSERTs.
      Parameters:
      batchSize - the JDBC batch size for INSERTs (default 1000)
      Returns:
      this builder
    • rows

      public BloviateContainers.Builder rows(long rows)
      Sets the default number of rows to generate per table.
      Parameters:
      rows - the default number of rows to generate per table (default 100)
      Returns:
      this builder
    • seed

      public BloviateContainers.Builder seed(long seed)
      Sets the base seed for reproducible generation.
      Parameters:
      seed - the base seed for reproducible generation (default 0); vary it for a different but reproducible dataset
      Returns:
      this builder
    • databaseSupport

      public BloviateContainers.Builder databaseSupport(DatabaseSupport databaseSupport)
      Overrides the auto-detected DatabaseSupport.
      Parameters:
      databaseSupport - the support to use, or null to auto-detect from the connection
      Returns:
      this builder
    • tableConfigurations

      public BloviateContainers.Builder tableConfigurations(Set<TableConfiguration> tableConfigurations)
      Sets optional per-table overrides.
      Parameters:
      tableConfigurations - optional per-table overrides (row counts, column generators)
      Returns:
      this builder
    • fill

      public void fill() throws SQLException
      Opens a connection to the container and fills its schema.
      Throws:
      SQLException - if a database access error occurs