java.lang.Object
io.ebeaninternal.server.core.AbstractSqlQueryRequest
- All Implemented Interfaces:
CancelableQuery
- Direct Known Subclasses:
DtoQueryRequest,RelationalQueryRequest
Wraps the objects involved in executing a SQL / Relational Query.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected PreparedStatementprotected final SpiSqlBindingprotected ResultSetprotected final SpiEbeanServerprotected Stringprotected longprotected SpiTransaction -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()voidclose()Close the underlying resources.voidEnd the transaction if it was locally created.protected voidexecuteAsSql(Binder binder) voidexecuteSql(Binder binder, SpiQuery.Type type) Prepare and execute the SQL using the Binder.protected voidReturn the bindLog for this request.getSql()Return the SQL executed for this query.voidCreate a transaction if none currently exists.booleanisLogSql()abstract booleannext()Return true if we can navigate to the next row.protected abstract void
-
Field Details
-
query
-
server
-
transaction
-
sql
-
resultSet
-
bindLog
-
pstmt
-
startNano
protected long startNano
-
-
Method Details
-
initTransIfRequired
public void initTransIfRequired()Create a transaction if none currently exists. -
endTransIfRequired
public void endTransIfRequired()End the transaction if it was locally created. -
flushJdbcBatchOnQuery
protected void flushJdbcBatchOnQuery() -
isLogSql
public boolean isLogSql() -
getBindLog
Return the bindLog for this request. -
next
Return true if we can navigate to the next row.- Throws:
SQLException
-
requestComplete
protected abstract void requestComplete() -
close
public void close()Close the underlying resources. -
executeSql
Prepare and execute the SQL using the Binder.- Throws:
SQLException
-
executeAsSql
- Throws:
SQLException
-
getSql
Return the SQL executed for this query. -
cancel
public void cancel()- Specified by:
cancelin interfaceCancelableQuery
-