|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mckoi.database.jdbc.SQLQuery
public final class SQLQuery
Represents an SQL Query to the database. This includes the query string itself plus any data types that are part of the query.
FUTURE ENHANCEMENTS: This could do some preliminary parsing of the query string for faster translation by the database.
Constructor Summary | |
---|---|
SQLQuery(java.lang.String query)
Constructs the query. |
Method Summary | |
---|---|
void |
addVar(java.lang.Object ob)
Adds a variable to the query. |
void |
clear()
Clears all the parameters. |
SQLQuery |
copy()
Creates an exact copy of this object. |
static SQLQuery |
deserializeFromBlob(ByteLongObject ob)
Deserializes an SQLQuery object from a ByteLongObject. |
boolean |
equals(java.lang.Object ob)
Returns true if this query is equal to another. |
java.lang.String |
getQuery()
Returns the query string. |
java.lang.Object[] |
getVars()
Returns the array of all objects that are to be used as substitutions for '?' in the query. |
void |
prepare(boolean do_escape_processing)
Prepares the query by parsing the query string and performing any updates that are required before being passed down to the lower layers of the database engine for processing. |
static SQLQuery |
readFrom(java.io.DataInputStream in)
Reads an SQLQuery object from the data input stream. |
ByteLongObject |
serializeToBlob()
Serializes an SQLQuery object to a ByteLongObject. |
void |
setVar(int i,
java.lang.Object ob)
Sets a variable at the given index. |
java.lang.String |
toString()
Outputs the query as text (for debugging) |
void |
writeTo(java.io.DataOutputStream out)
Writes the SQL query to the data output stream. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SQLQuery(java.lang.String query)
Method Detail |
---|
public void addVar(java.lang.Object ob)
public void setVar(int i, java.lang.Object ob)
public void clear()
public java.lang.String getQuery()
public java.lang.Object[] getVars()
NOTE: Array returned references internal Object[] here so don't change!
public void prepare(boolean do_escape_processing) throws java.sql.SQLException
java.sql.SQLException
public boolean equals(java.lang.Object ob)
equals
in class java.lang.Object
public SQLQuery copy()
public java.lang.String toString()
toString
in class java.lang.Object
public void writeTo(java.io.DataOutputStream out) throws java.io.IOException
java.io.IOException
public static SQLQuery readFrom(java.io.DataInputStream in) throws java.io.IOException
java.io.IOException
public ByteLongObject serializeToBlob()
public static SQLQuery deserializeFromBlob(ByteLongObject ob)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |