|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.intermine.sql.query.ExplainResult
public class ExplainResult
Represents a result from an EXPLAIN request to a database.
| Field Summary | |
|---|---|
protected long |
complete
|
protected long |
estimatedRows
|
protected long |
rows
|
protected long |
start
|
protected long |
width
|
| Constructor Summary | |
|---|---|
ExplainResult()
|
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
|
long |
getComplete()
Returns the number of page requests before the query is completed, estimated by the database for this query. |
long |
getEstimatedRows()
Returns the best current estimate for the number of rows for this query. |
static ExplainResult |
getInstance(java.sql.PreparedStatement stmt)
Constructs an instance of ExplainResult given a PreparedStatement object. |
static ExplainResult |
getInstance(Query query,
java.sql.Connection database)
Constructs an instance of ExplainResult for a given Query and database Connection. |
static ExplainResult |
getInstance(java.lang.String query,
java.sql.Connection database)
Constructs an instance of ExplainResult for a given query String and database Connection. |
long |
getRows()
Returns the number of rows estimated by the database for this query. |
long |
getStart()
Returns the number of page requests before the first row is returned, estimated by the database for this query. |
long |
getTime()
Returns an estimate of the time it will take to complete the query. |
long |
getWidth()
Returns the width of the data returned by the database for this query. |
int |
hashCode()
|
void |
setEstimatedRows(long estimatedRows)
Use this to provide the object with a "better" estimate of the number of rows in the results of this Query. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected long rows
protected long start
protected long complete
protected long width
protected long estimatedRows
| Constructor Detail |
|---|
public ExplainResult()
| Method Detail |
|---|
public static ExplainResult getInstance(java.lang.String query,
java.sql.Connection database)
throws java.sql.SQLException
query - the String query to be explained. It need not start with "EXPLAIN"database - a java.sql.Connection by which to access the
database. The particular subclass of ExplainResult returned
depends on the type of this Connection
java.sql.SQLException - if the query cannot be explained by that database
public static ExplainResult getInstance(Query query,
java.sql.Connection database)
throws java.sql.SQLException
query - the org.intermine.sql.query.Query to be explaineddatabase - a java.sql.Connection by which to access the
database. The particular subclass of ExplainResult returned
depends on the type of this Connection
java.sql.SQLException - if the query cannot be explained by that database
public static ExplainResult getInstance(java.sql.PreparedStatement stmt)
throws java.sql.SQLException
stmt - the PreparedStatement to be explained
java.sql.SQLException - if the query cannot be explained by that databasepublic long getRows()
public long getStart()
public long getComplete()
public long getWidth()
public void setEstimatedRows(long estimatedRows)
estimatedRows - the better estimate, in rowspublic long getEstimatedRows()
public long getTime()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||