Details
Description
Currently, a developer must use the GemFire's System property...
-Dgemfire.Query.VERBOSE=true
To debug an OQL Query statement generated from Spring Data GemFire's Repository support and OQL-based Query methods based on the standard naming conventions.
Unfortunately, the GemFire System property is an all or nothing option to turn debugging on for all application OQL Query statements when a developer may only need, or want to debug a single or specific OQL Queries.
Using straight OQL syntax, a developer would just need to specify a <TRACE> statement in an individual OQL Query to debug it, like so...
<trace> SELECT * FROM /Users u WHERE u.name = $1
However, using the corresponding Repository Query method, the standard naming conventions limit the use of available keywords...
User findByName(String username);
This improvement would add support for OQL statement extensions, like <TRACE>, and other keywords (e.g. IMPORT, LIMIT) via annotations, e.g. ...
@Trace @Limit(10) @Import("example.app.domain.User") User findByNameLike(String username);
Resulting in the following, generated OQL Query...
IMPORT example.app.domain.User;
SELECT * FROM /Users u WHERE u.name LIKE '$1' LIMIT 10
Currently, the only way to do the later would be to use the @Query annotation...
@Query("IMPORT example.app.domain.User; SELECT * FROM /Users u WHERE u.name LIKE '$1' LIMIT 10") User findByName(String username);