|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.radrails.db.core.QueryAdministrator
Manages queries and returns objects based on SQL queries. Provides simple methods for getting columns, tables, etc.
Constructor Summary | |
QueryAdministrator(java.sql.Connection conn)
Creates a new QueryAdministrator based on the specified connection. |
Method Summary | |
QueryResult |
execute(java.lang.String sql)
Executes a SQL query and returns a QueryResult object. |
QueryResult |
execute(java.lang.String sql,
int fetchSize)
Executes a SQL query and returns a QueryResult object. |
void |
executeStatement(java.lang.String sql)
Executes a SQL statement that can modify the table. |
java.util.Collection |
getColumns(java.lang.String table)
Gets the columns in a table. |
java.util.Collection |
getTables()
Gets the tables in the database. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public QueryAdministrator(java.sql.Connection conn)
conn
- The java.sql.Connection for the database connection.Method Detail |
public java.util.Collection getTables()
public java.util.Collection getColumns(java.lang.String table)
table
- The table to get the columns for.
public QueryResult execute(java.lang.String sql, int fetchSize) throws java.sql.SQLException
sql
- The SQL statement to execute.fetchSize
- The number of rows to fetch.
java.sql.SQLException
- If the statement is incorrect syntax or failed to execute.public QueryResult execute(java.lang.String sql) throws java.sql.SQLException
sql
- The SQL statement to execute.
java.sql.SQLException
- If the statement is incorrect syntax or failed to execute.public void executeStatement(java.lang.String sql) throws java.sql.SQLException
sql
- The SQL statement to execute.
java.sql.SQLException
- If an error occurred during execution.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |