Skip to content

Commit 324527b

Browse files
committed
feat: Making expected SQL annotations more descriptive and repeatable
- Add optional comment to ExpectJdbcQueryExecution Resolves quick-perf#222 Signed-off-by: Esta Nagy <[email protected]>
1 parent a1a9c40 commit 324527b

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

sql/sql-annotations/src/main/java/org/quickperf/sql/annotation/ExpectJdbcQueryExecution.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,10 @@
4040
*/
4141
int value() default 1;
4242

43+
/**
44+
* To comment on the reason why we expect the specified amount of queries of this type.
45+
* @return comment message
46+
*/
47+
String comment() default "";
48+
4349
}

sql/sql-annotations/src/main/java/org/quickperf/sql/annotation/SqlAnnotationBuilder.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ public Class<? extends Annotation> annotationType() {
134134
public int value() {
135135
return value;
136136
}
137+
@Override
138+
public String comment() {
139+
return "";
140+
}
137141
};
138142
}
139143

0 commit comments

Comments
 (0)