Package io.vertx.rxjava3.sqlclient
Class PreparedStatement
java.lang.Object
io.vertx.rxjava3.sqlclient.PreparedStatement
- All Implemented Interfaces:
RxDelegate
A prepared statement, the statement is pre-compiled and it's more efficient to execute the statement for multiple times.
In addition, this kind of statement provides protection against SQL injection attacks.
From a prepared statement you can
- use
query()to create and execute aPreparedQuery - use
cursor()to create aCursor - use
createStream(int)to create aRowStream
NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPreparedStatement(PreparedStatement delegate) PreparedStatement(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Completableclose()Close the prepared query and release its resources.createStream(int fetch) LikecreateStream(int)but with empty arguments.createStream(int fetch, Tuple args) Execute the prepared query with a cursor and createStream the result.cursor()Likecursor()but with empty arguments.Create a cursor with the providedarguments.booleaninthashCode()static PreparedStatementquery()Create a prepared query for this statement.io.reactivex.rxjava3.core.CompletablerxClose()Close the prepared query and release its resources.toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
PreparedStatement
-
PreparedStatement
-
-
Method Details
-
toString
-
equals
-
hashCode
public int hashCode() -
getDelegate
- Specified by:
getDelegatein interfaceRxDelegate
-
query
Create a prepared query for this statement.- Returns:
- the prepared query
-
cursor
Likecursor()but with empty arguments.- Returns:
-
cursor
Create a cursor with the providedarguments.- Parameters:
args- the list of arguments- Returns:
- the query
-
createStream
LikecreateStream(int)but with empty arguments.- Parameters:
fetch-- Returns:
-
createStream
Execute the prepared query with a cursor and createStream the result. The createStream opens a cursor with afetchsize to fetch the results. Note: this requires to be in a transaction, since cursors require it.- Parameters:
fetch- the cursor fetch sizeargs- the prepared query arguments- Returns:
- the createStream
-
close
public io.reactivex.rxjava3.core.Completable close()Close the prepared query and release its resources.- Returns:
-
rxClose
public io.reactivex.rxjava3.core.Completable rxClose()Close the prepared query and release its resources.- Returns:
-
newInstance
-