Skip to content

Commit

Permalink
JDBDT: support for #52 (takeSnapshot)
Browse files Browse the repository at this point in the history
  • Loading branch information
edrdo committed Dec 7, 2018
1 parent 8f58bb1 commit eaa580b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/main/java/org/jdbdt/JDBDT.java
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,22 @@ public static QueryBuilder select(String... columns) {
takeSnapshot(DataSource source) {
return source.executeQuery(CallInfo.create(), true);
}

/**
* Take a database snapshot for several data sources.
*
* @param sources Data sources.
*
* @see #takeSnapshot(DataSource)
* @since 1.2
*/
@SafeVarargs
public static void
takeSnapshot(DataSource... sources) {
foreach(sources,
(callInfo, source) -> source.executeQuery(callInfo, true),
CallInfo.create());
}

/**
* Query the data source, without setting a snapshot.
Expand Down

0 comments on commit eaa580b

Please sign in to comment.