private static class P2OAccessWorker.QueryIndexInfo
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private Aast |
ast
Record phrase or embedded SQL AST
|
private java.lang.String |
comment
Suspicious index selection comment
|
Constructor and Description |
---|
QueryIndexInfo(Aast ast,
java.lang.String comment)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
writeContent(java.lang.String cacheFile,
java.io.Writer bw)
Write content about this query's index selection to the report, including a code
snippet of the query.
|
private final Aast ast
private final java.lang.String comment
QueryIndexInfo(Aast ast, java.lang.String comment)
ast
- Record phrase or embedded SQL AST.comment
- Suspicious index selection comment.void writeContent(java.lang.String cacheFile, java.io.Writer bw) throws java.io.IOException, SchemaException
TODO: make the source file reading more efficient; if there are multiple queries from the same file, we re-read a lot of lines unnecessarily.
cacheFile
- Source file from which to read the code snippet.bw
- Report writer.java.io.IOException
- if there is an error reading from the source file or writing to the report
file.SchemaException
- if there is an error inspecting the AST for information.