net.aditsu.depeche
public abstract class SQLQuery extends BaseQuery
Modifier and Type | Method and Description |
---|---|
void |
addParams(List<Serializable> params)
Adds a set of parameters for this query, to be executed in a batch
|
int[] |
executeBatch()
Executes this query as a batch (INSERT/UPDATE/DELETE)
and returns the numbers of affected rows for each set of parameters
|
Record |
getOneRecord(Conn conn)
Runs this query as a SELECT (if needed) using the given connection and returns a single record;
it throws an exception if the number of results is not 1
|
abstract List<Serializable> |
getParams()
Returns this query's parameters
|
Provider |
getProvider()
Returns the provider used by this query
|
ProviderRef |
getProviderRef()
Returns the provider reference used by this query
|
Record |
getRecord(Conn conn)
Runs this query as a SELECT (if needed) using the given connection and returns a single record, or null if there are no results;
it throws an exception if there are multiple results
|
abstract String |
getSelectSQL()
Returns the SQL string for running this query as a SELECT query
|
abstract String |
getUpdateSQL()
Returns the SQL string for running this query as a generic update query
|
SQLQuery |
select()
Runs this query as a SELECT (and caches the results)
|
SQLQuery |
select(Conn conn)
Runs this query as a SELECT using the given connection (and caches the results)
|
int |
update()
Runs this query as an UPDATE and returns the number of rows affected
|
int |
update(Conn conn)
Runs this query as an UPDATE using the given connection and returns the number of rows affected
|
clearData, get, getColumn, getColumn, getColumn, getColumn, getColumnInfo, getLocalQuery, getOneRecord, getRecord, hasRun, size
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, set, subList
public ProviderRef getProviderRef()
public Provider getProvider()
public SQLQuery select(Conn conn)
public SQLQuery select()
public abstract String getSelectSQL()
public abstract String getUpdateSQL()
public abstract List<Serializable> getParams()
public int update()
public int update(Conn conn)
public Record getOneRecord(Conn conn)
public Record getRecord(Conn conn)
public void addParams(List<Serializable> params)
public int[] executeBatch()