T
- The raw query typepublic interface QueryConverter<T>
DatastoreParameters
that use slowQuery() or slowQueryWithInput() must implement this interface
in order to properly record slow queries for their framework.
Note: Implementations of this interface MUST guarantee thread-safety.Modifier and Type | Method and Description |
---|---|
java.lang.String |
toObfuscatedQueryString(T rawQuery)
Takes a raw query object and return it as a String representing an obfuscated form of the query.
|
java.lang.String |
toRawQueryString(T rawQuery)
Takes a raw query object and returns it as a String representing the query.
|
java.lang.String toRawQueryString(T rawQuery)
rawQuery
- the raw query objectjava.lang.String toObfuscatedQueryString(T rawQuery)
Sensitive information generally includes any changing values that the caller includes in the query. Replacement patterns are the responsibility of the caller but SHOULD coalesce queries that only differ by parameter values down a single unique String. For example, the following SQL queries will coalesce into a single query:
Result: SELECT * FROM table1 WHERE parameter1 = ?
NOTE: This method MUST return a different value than toRawQueryString(Object)
otherwise slow sql
processing will NOT occur.
rawQuery
- the raw query object