From 2431c9d83ffe4fb5d2c3e486df57cf7b0c9d1b2c Mon Sep 17 00:00:00 2001 From: Felipe Fernandez Date: Wed, 8 Jun 2016 11:39:30 +0100 Subject: [PATCH] Update documentation to reflect collection variable matching. --- docs/java/priming-prepared-statements.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/java/priming-prepared-statements.md b/docs/java/priming-prepared-statements.md index 5cc82686..3ee4cdda 100644 --- a/docs/java/priming-prepared-statements.md +++ b/docs/java/priming-prepared-statements.md @@ -101,7 +101,22 @@ outcomes as they will overwrite each other. If none of the outcomes match then a RuntimeException will currently be thrown. This will be replaced with default behaviour of returning an empty successful result. -Collections are not currently supported for variable matching. +Collections can also be used for variable matching: + +``` +MultiPrimeRequest prime = MultiPrimeRequest.request() + .withWhen(when() + .withQuery("select * from person where nicknames = ?")) + .withThen(then() + .withVariableTypes(list(TEXT)) + .withOutcomes( + outcome(match().withVariableMatchers(exactMatch().withMatcher(Lists.newArrayList("Zen", "Nez")).build()), action().withResult(Result.success)) + ) + ) + .build(); + +primingClient.multiPrime(prime); +``` #### Priming errors