Package org.assertj.db.type
Class Changes.Builder
java.lang.Object
org.assertj.db.type.Changes.Builder
- Enclosing class:
Changes
Fluent
Changes builder.
Use AssertDbConnection to construct new instance of this builder.
AssertDbConnection connection = ....;
Changes changes = connection.changes().build();
Changes changes = connection.changes().table("movie", t -> t.columnToCheck(new String[] { "number", "title" })).build();
- Since:
- 3.0.0
- Author:
- Julien Roy
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the Changes instance.Force usage of SQL request for thisChangesinstead load all database objects.request(String request, Consumer<Request.Builder> customizer) Force usage of SQL request for thisChangesinstead load all database objects.Add new table to table list to use for thisChangesinstead load all database objects.table(String name, Consumer<Table.Builder> customizer) Add new table to table list to use for thisChangesinstead load all database objects.
-
Method Details
-
request
- Parameters:
request- Request to use to retrieve changes from DB.- Returns:
- Current builder instance.
-
request
Force usage of SQL request for thisChangesinstead load all database objects.- Parameters:
request- SQL Request to use to retrieve changes from DB.- Returns:
- Current builder instance.
-
request
Force usage of SQL request for thisChangesinstead load all database objects.AssertDbConnection connection = ....; Changes changes = connection.changes() .request("select * from actor where id = ?", r -> r.parameters(1)) .build();- Parameters:
request- SQL Request to use to retrieve changes from DB.customizer- Method that allow to customize theRequestinstance created.- Returns:
- Current builder instance.
-
table
Add new table to table list to use for thisChangesinstead load all database objects. Each call to this method add new table to list.- Parameters:
name- Table name to use to retrieve changes from DB.- Returns:
- Current builder instance.
-
table
Add new table to table list to use for thisChangesinstead load all database objects. Each call to this method add new table to list.AssertDbConnection connection = ....; Changes changes = connection.changes() .table("actor", t -> t.setColumnsToOrder(new Order[]{Order.asc("where")}) .build();- Parameters:
name- Table name to use to retrieve changes from DB.customizer- Method that allow to customize theTableinstance created.- Returns:
- Current builder instance.
-
tables
- Parameters:
tables- Tables to use to retrieve changes from DB.- Returns:
- Current builder instance.
-
build
Build the Changes instance.- Returns:
- Changes instance to use in assertThat.
-