class PreparedStatement extends AnyRef
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 io.vertx.scala.sqlclient.PreparedStatement#query to create and execute a io.vertx.scala.sqlclient.PreparedQuery
- use io.vertx.scala.sqlclient.PreparedStatement#cursor to create a io.vertx.scala.sqlclient.Cursor
- use io.vertx.scala.sqlclient.PreparedStatement#createStream to create a io.vertx.scala.sqlclient.RowStream
- Alphabetic
- By Inheritance
- PreparedStatement
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new PreparedStatement(_asJava: AnyRef)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asJava: AnyRef
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
close(completionHandler: Handler[AsyncResult[Unit]]): Unit
Like io.vertx.scala.sqlclient.PreparedStatement#close but notifies the
completionHandlerwhen it's closed. -
def
close(): Unit
Close the prepared query and release its resources.
-
def
closeFuture(): Future[Unit]
Like close but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
createStream(fetch: Int, args: Tuple): RowStream[Row]
Execute the prepared query with a cursor and createStream the result.
Execute the prepared query with a cursor and createStream the result. The createStream opens a cursor with a
fetchsize to fetch the results.Note: this requires to be in a transaction, since cursors require it. * @param fetch the cursor fetch size
- args
the prepared query arguments
- returns
the createStream
-
def
cursor(args: Tuple): Cursor
Create a cursor with the provided
arguments.Create a cursor with the provided
arguments. * @param args the list of arguments- returns
the query
-
def
cursor(): Cursor
- returns
create a query cursor with a
fetchsize and empty arguments
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
query(): PreparedQuery[RowSet[Row]]
Create a prepared query for this statement.
Create a prepared query for this statement. * @return the prepared query
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )