Class DataColumnGenerator

java.lang.Object
io.bloviate.gen.AbstractDataGenerator<String>
io.bloviate.gen.tpcc.DataColumnGenerator
All Implemented Interfaces:
DataGenerator<String>

public class DataColumnGenerator extends AbstractDataGenerator<String>
Generates the TPC-C i_data / s_data values (clause 4.3.3.1): a random alphabetic string of length 26..50 that, 10% of the time, contains the literal "ORIGINAL" at a random position.
  • Field Details

    • ORIGINAL

      public static final String ORIGINAL
      The TPC-C "original" data marker embedded in 10% of generated values.
      See Also:
  • Method Details

    • generate

      public String generate()
      Description copied from interface: DataGenerator
      Generates a random value of type T.
      Returns:
      a generated value, may be null if the generator supports nullable columns
    • get

      public String get(ResultSet resultSet, int columnIndex) throws SQLException
      Description copied from interface: DataGenerator
      Retrieves a value from a ResultSet column.
      Parameters:
      resultSet - the result set to read from
      columnIndex - the 1-based column index
      Returns:
      the value from the result set, properly cast to type T
      Throws:
      SQLException - if the database operation fails