|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.syncsoft.plainsql.PlainSql
public class PlainSql
This class supports SQL statement objects. The underlying object is a JDBC PreparedStatement. The PSConnection class and other classes in this package rely on PoSQL for mostactivities.
| Constructor Summary | |
|---|---|
PlainSql(PSconnection conn,
java.lang.String sql)
Constructor to create a SQL statement object from a SQL string |
|
| Method Summary | |
|---|---|
int |
bindArgs(java.lang.Object... args)
Bind the provided array of arguments to the statement |
void |
close()
Closes the statement and releases the cursor and resources This _might_ not totally close the statement if statement caching is enabled (eg, might just move the statement to the cache) |
int |
colcount()
Number of columns in the current result set |
boolean |
execute()
Execute the current SQL statement. |
boolean |
execute(java.lang.Object... args)
Execute a result set, accepting bind variables as arguments |
void |
executeBatch()
Call the JDBC executeBatch() call to apply a batch of data |
int |
executeUpdate()
Call executeUpdate() to execute a SQL with no results |
int |
executeUpdate(java.lang.Object[] args)
Same as executeUpdate(), but accepts a list of bind variables |
RowSet |
fetchAll(java.lang.Object... args)
Returns all the result sets for a query as an ArrayList of Maps. |
Row |
fetchOne()
Return the current row from the current result set as a Row object |
java.util.List |
getColNames()
Returns a List of column names for the current result set. |
int |
getFetchahead()
Get the fetchahead value associated with this statement |
java.sql.Connection |
getJdbcConnection()
Get the JDBC connection associated with this statement |
java.sql.PreparedStatement |
getJdbcStatement()
Get the PreparedStatement object associated with this statement. |
PSconnection |
getPsConnection()
Get the PlainSQL connection associated with this statement. |
java.sql.ResultSet |
getResult()
Get the JDBC ResultSet object associated with this statement |
java.sql.ResultSetMetaData |
getRsMetaData()
Get the ResultSetMetaData object associated with this statement |
java.lang.String |
getSql()
Get the SQL text associated with this statement |
Row |
makeRow(java.sql.ResultSet rs)
Return a row object for the current row in a result set |
boolean |
nextRow()
Move to next row in the result set |
void |
setFetchAhead(int fetchahead)
Set the fetchahead (pre-fetch) value for this statement |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PlainSql(PSconnection conn,
java.lang.String sql)
throws java.sql.SQLException
conn - :
JDBC Connection objectsql - :
SQL for the statement
java.sql.SQLException| Method Detail |
|---|
public int bindArgs(java.lang.Object... args)
throws java.sql.SQLException
args -
java.sql.SQLException
public void close()
throws java.sql.SQLException
java.sql.SQLException
public int colcount()
throws java.sql.SQLException
java.sql.SQLException
public boolean execute()
throws java.sql.SQLException
java.sql.SQLException
public boolean execute(java.lang.Object... args)
throws java.sql.SQLException
args - array of arguments
java.sql.SQLException
public void executeBatch()
throws java.sql.SQLException
java.sql.SQLException
public int executeUpdate()
throws java.sql.SQLException
java.sql.SQLException
public int executeUpdate(java.lang.Object[] args)
throws java.sql.SQLException
args - variables
java.sql.SQLException
public RowSet fetchAll(java.lang.Object... args)
throws java.sql.SQLException
java.sql.SQLException
public Row fetchOne()
throws java.sql.SQLException
java.sql.SQLException
public Row makeRow(java.sql.ResultSet rs)
throws java.sql.SQLException
rs - :
A result set
java.sql.SQLException
public java.util.List getColNames()
throws java.sql.SQLException
java.sql.SQLExceptionpublic int getFetchahead()
public java.sql.Connection getJdbcConnection()
public java.sql.PreparedStatement getJdbcStatement()
public PSconnection getPsConnection()
public java.sql.ResultSet getResult()
public java.sql.ResultSetMetaData getRsMetaData()
public java.lang.String getSql()
public boolean nextRow()
throws java.sql.SQLException
java.sql.SQLException
public void setFetchAhead(int fetchahead)
throws java.sql.SQLException
fetchahead -
java.sql.SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||