@Retention(value=RUNTIME) @Target(value=FIELD) public @interface TruncateTables
A field in a Spock specification marked with @TruncateTables will be used
to acquire a database connection and delete data from all tables.
By default the annotation can be used on a Connection,
DataSource or Sql field.
To use a different field type simply implement Connector (or extend
TypedConnector) and specify value().
After each feature method (or after all if the annotated field is also
annotated with @Shared) all data is deleted from any database tables
accessible via the connection.
Data is not deleted in any particular order but if foreign key constraints
exist deletion will be performed in an order that ensures constraints are not
violated.
public abstract Class<? extends Connector> value
The strategy used to connect to the database. If this annotation is applied
to anything other than a Connection, DataSource or Groovy
Sql field you need to supply your own implementation.