Annotation Type Query
-
@Retention(RUNTIME) @Target({METHOD,ANNOTATION_TYPE}) @Documented public @interface Query
Annotation used in user-defined repositories to provide SQL for custom Query Methods.- Since:
- 1.1
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description boolean
dmlStatement
Indicates if the annotated Query Method is a DML statement or an SQL statement.String
value
Takes a Cloud Spanner SQL string to define the actual query to be executed.
-
-
-
Element Detail
-
value
String value
Takes a Cloud Spanner SQL string to define the actual query to be executed. This one will take precedence over the method name then.Please note that sorting options should be passed by a
Pageable
parameter instead of the query. Otherwise the sorting could be broken by logic that fetches eager-interleaved fields.- Returns:
- the SQL Cloud Spanner query string.
- Default:
- ""
-
-