vertx-lang-scala-docs_2.12 3.4.2 API < Back
 

# Packages

-  package root
  Definition Classes
    root
-  package io
  Definition Classes
    root
-  package vertx
  Definition Classes
    io
-  package scala
  Definition Classes
    vertx
-  package ext
  Definition Classes
    scala
-  package sql
  Definition Classes
    ext
- ResultSet
- SQLClient
- SQLConnection
- SQLRowStream
- UpdateResult

c

io.vertx.scala.ext.sql

# SQLConnection 

###
Companion object SQLConnection

#### class SQLConnection extends AnyRef

Represents a connection to a SQL database

Linear Supertypes
AnyRef, Any
 
Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. SQLConnection
2. AnyRef
3. Any

1. Hide All
2. Show All

Visibility

1. Public
2. All

### Instance Constructors

1.  new SQLConnection(_asJava: AnyRef)

### Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##(): Int
   Definition Classes
     AnyRef → Any
3.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
4.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
5.  def asJava: AnyRef
6.  def batch(sqlStatements: Buffer[String], handler: Handler[AsyncResult[Buffer[Int]]]): SQLConnection

   Batch simple SQL strings and execute the batch where the async result contains a array of Integers.

   Batch simple SQL strings and execute the batch where the async result contains a array of Integers.

   sqlStatements

     sql statement

   handler

     the result handler

7.  def batchCallableWithParams(sqlStatement: String, inArgs: Buffer[JsonArray], outArgs: Buffer[JsonArray], handler: Handler[AsyncResult[Buffer[Int]]]): SQLConnection

   Batch a callable statement with all entries from the args list.

   Batch a callable statement with all entries from the args list. Each entry is a batch. The size of the lists inArgs and outArgs MUST be the equal. The operation completes with the execution of the batch where the async result contains a array of Integers.

   sqlStatement

     sql statement

   inArgs

     the callable statement input arguments

   outArgs

     the callable statement output arguments

   handler

     the result handler

8.  def batchCallableWithParamsFuture(sqlStatement: String, inArgs: Buffer[JsonArray], outArgs: Buffer[JsonArray]): Future[Buffer[Int]]

   Like batchCallableWithParams but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

9.  def batchFuture(sqlStatements: Buffer[String]): Future[Buffer[Int]]

   Like batch but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

10.  def batchWithParams(sqlStatement: String, args: Buffer[JsonArray], handler: Handler[AsyncResult[Buffer[Int]]]): SQLConnection

    Batch a prepared statement with all entries from the args list.

    Batch a prepared statement with all entries from the args list. Each entry is a batch. The operation completes with the execution of the batch where the async result contains a array of Integers.

    sqlStatement

      sql statement

    args

      the prepared statement arguments

    handler

      the result handler

11.  def batchWithParamsFuture(sqlStatement: String, args: Buffer[JsonArray]): Future[Buffer[Int]]

    Like batchWithParams but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

12.  def call(sql: String, resultHandler: Handler[AsyncResult[ResultSet]]): SQLConnection

    Calls the given SQL `PROCEDURE` which returns the result from the procedure.

    Calls the given SQL `PROCEDURE` which returns the result from the procedure.

    sql

      the SQL to execute. For example `{call getEmpName``.

    resultHandler

      the handler which is called once the operation completes. It will return a `ResultSet`.

13.  def callFuture(sql: String): Future[ResultSet]

    Like call but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

14.  def callWithParams(sql: String, params: JsonArray, outputs: JsonArray, resultHandler: Handler[AsyncResult[ResultSet]]): SQLConnection

    Calls the given SQL `PROCEDURE` which returns the result from the procedure.

    Calls the given SQL `PROCEDURE` which returns the result from the procedure.

    The index of params and outputs are important for both arrays, for example when dealing with a prodecure that takes the first 2 arguments as input values and the 3 arg as an output then the arrays should be like:

          params = [VALUE1, VALUE2, null]
          outputs = [null, null, "VARCHAR"]

    sql

      the SQL to execute. For example `{call getEmpName (?, ?)``.

    params

      these are the parameters to fill the statement.

    outputs

      these are the outputs to fill the statement.

    resultHandler

      the handler which is called once the operation completes. It will return a `ResultSet`.

15.  def callWithParamsFuture(sql: String, params: JsonArray, outputs: JsonArray): Future[ResultSet]

    Like callWithParams but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

16.  def clone(): AnyRef
    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
17.  def close(): Unit

    Closes the connection.

    Closes the connection. Important to always close the connection when you are done so it's returned to the pool.

18.  def close(handler: Handler[AsyncResult[Unit]]): Unit

    Closes the connection.

    Closes the connection. Important to always close the connection when you are done so it's returned to the pool.

    handler

      the handler called when this operation completes.

19.  def closeFuture(): Future[Unit]

    Like close but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

20.  def commit(handler: Handler[AsyncResult[Unit]]): SQLConnection

    Commits all changes made since the previous commit/rollback.

    Commits all changes made since the previous commit/rollback.

    handler

      the handler called when this operation completes.

21.  def commitFuture(): Future[Unit]

    Like commit but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

22.  final def eq(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
23.  def equals(arg0: Any): Boolean
    Definition Classes
      AnyRef → Any
24.  def execute(sql: String, resultHandler: Handler[AsyncResult[Unit]]): SQLConnection

    Executes the given SQL statement

    Executes the given SQL statement

    sql

      the SQL to execute. For example `CREATE TABLE IF EXISTS table ...`

    resultHandler

      the handler which is called once this operation completes.

25.  def executeFuture(sql: String): Future[Unit]

    Like execute but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

26.  def finalize(): Unit
    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( classOf[java.lang.Throwable] )
27.  final def getClass(): Class[_]
    Definition Classes
      AnyRef → Any
28.  def getTransactionIsolation(handler: Handler[AsyncResult[TransactionIsolation]]): SQLConnection

    Attempts to return the transaction isolation level for this Connection object to the one given.

    Attempts to return the transaction isolation level for this Connection object to the one given.

    handler

      the handler called when this operation completes.

29.  def getTransactionIsolationFuture(): Future[TransactionIsolation]

    Like getTransactionIsolation but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

30.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
31.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
32.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
33.  final def notify(): Unit
    Definition Classes
      AnyRef
34.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
35.  def query(sql: String, resultHandler: Handler[AsyncResult[ResultSet]]): SQLConnection

    Executes the given SQL `SELECT` statement which returns the results of the query.

    Executes the given SQL `SELECT` statement which returns the results of the query.

    sql

      the SQL to execute. For example `SELECT * FROM table ...`.

    resultHandler

      the handler which is called once the operation completes. It will return a `ResultSet`.

36.  def queryFuture(sql: String): Future[ResultSet]

    Like query but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

37.  def queryStream(sql: String, handler: Handler[AsyncResult[SQLRowStream]]): SQLConnection

    Executes the given SQL `SELECT` statement which returns the results of the query as a read stream.

    Executes the given SQL `SELECT` statement which returns the results of the query as a read stream.

    sql

      the SQL to execute. For example `SELECT * FROM table ...`.

    handler

      the handler which is called once the operation completes. It will return a `SQLRowStream`.

38.  def queryStreamFuture(sql: String): Future[SQLRowStream]

    Like queryStream but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

39.  def queryStreamWithParams(sql: String, params: JsonArray, handler: Handler[AsyncResult[SQLRowStream]]): SQLConnection

    Executes the given SQL `SELECT` statement which returns the results of the query as a read stream.

    Executes the given SQL `SELECT` statement which returns the results of the query as a read stream.

    sql

      the SQL to execute. For example `SELECT * FROM table ...`.

    params

      these are the parameters to fill the statement.

    handler

      the handler which is called once the operation completes. It will return a `SQLRowStream`.

40.  def queryStreamWithParamsFuture(sql: String, params: JsonArray): Future[SQLRowStream]

    Like queryStreamWithParams but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

41.  def queryWithParams(sql: String, params: JsonArray, resultHandler: Handler[AsyncResult[ResultSet]]): SQLConnection

    Executes the given SQL `SELECT` prepared statement which returns the results of the query.

    Executes the given SQL `SELECT` prepared statement which returns the results of the query.

    sql

      the SQL to execute. For example `SELECT * FROM table ...`.

    params

      these are the parameters to fill the statement.

    resultHandler

      the handler which is called once the operation completes. It will return a `ResultSet`.

42.  def queryWithParamsFuture(sql: String, params: JsonArray): Future[ResultSet]

    Like queryWithParams but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

43.  def rollback(handler: Handler[AsyncResult[Unit]]): SQLConnection

    Rolls back all changes made since the previous commit/rollback.

    Rolls back all changes made since the previous commit/rollback.

    handler

      the handler called when this operation completes.

44.  def rollbackFuture(): Future[Unit]

    Like rollback but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

45.  def setAutoCommit(autoCommit: Boolean, resultHandler: Handler[AsyncResult[Unit]]): SQLConnection

    Sets the auto commit flag for this connection.

    Sets the auto commit flag for this connection. True by default.

    autoCommit

      the autoCommit flag, true by default.

    resultHandler

      the handler which is called once this operation completes.

46.  def setAutoCommitFuture(autoCommit: Boolean): Future[Unit]

    Like setAutoCommit but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

47.  def setQueryTimeout(timeoutInSeconds: Int): SQLConnection

    Sets a connection wide query timeout.

    Sets a connection wide query timeout.

    It can be over written at any time and becomes active on the next query call.

    timeoutInSeconds

      the max amount of seconds the query can take to execute.

48.  def setTransactionIsolation(isolation: TransactionIsolation, handler: Handler[AsyncResult[Unit]]): SQLConnection

    Attempts to change the transaction isolation level for this Connection object to the one given.

    Attempts to change the transaction isolation level for this Connection object to the one given.

    The constants defined in the interface Connection are the possible transaction isolation levels.

    isolation

      the level of isolation

    handler

      the handler called when this operation completes.

49.  def setTransactionIsolationFuture(isolation: TransactionIsolation): Future[Unit]

    Like setTransactionIsolation but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

50.  final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
      AnyRef
51.  def toString(): String
    Definition Classes
      AnyRef → Any
52.  def update(sql: String, resultHandler: Handler[AsyncResult[UpdateResult]]): SQLConnection

    Executes the given SQL statement which may be an `INSERT`, `UPDATE`, or `DELETE` statement.

    Executes the given SQL statement which may be an `INSERT`, `UPDATE`, or `DELETE` statement.

    sql

      the SQL to execute. For example `INSERT INTO table ...`

    resultHandler

      the handler which is called once the operation completes.

53.  def updateFuture(sql: String): Future[UpdateResult]

    Like update but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

54.  def updateWithParams(sql: String, params: JsonArray, resultHandler: Handler[AsyncResult[UpdateResult]]): SQLConnection

    Executes the given prepared statement which may be an `INSERT`, `UPDATE`, or `DELETE` statement with the given parameters

    Executes the given prepared statement which may be an `INSERT`, `UPDATE`, or `DELETE` statement with the given parameters

    sql

      the SQL to execute. For example `INSERT INTO table ...`

    params

      these are the parameters to fill the statement.

    resultHandler

      the handler which is called once the operation completes.

55.  def updateWithParamsFuture(sql: String, params: JsonArray): Future[UpdateResult]

    Like updateWithParams but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

56.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
57.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
58.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

### Inherited from AnyRef

### Inherited from Any

### Ungrouped