class SQLConnection extends SQLOperations
Represents a connection to a SQL database
- Alphabetic
- By Inheritance
- SQLConnection
- SQLOperations
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-  new SQLConnection(_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
      
      
      - Definition Classes
- SQLConnection → SQLOperations
 
- 
      
      
      
        
      
    
      
        
        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. * @param sqlStatements sql statement - handler
- the result handler 
 
- 
      
      
      
        
      
    
      
        
        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. * @param sqlStatement sql statement - inArgs
- the callable statement input arguments 
- outArgs
- the callable statement output arguments 
- handler
- the result handler 
 
- 
      
      
      
        
      
    
      
        
        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. 
- 
      
      
      
        
      
    
      
        
        def
      
      
        batchFuture(sqlStatements: Buffer[String]): Future[Buffer[Int]]
      
      
      Like batch but returns a scala.concurrent.Future instead of taking an AsyncResultHandler. 
- 
      
      
      
        
      
    
      
        
        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. * @param sqlStatement sql statement - args
- the prepared statement arguments 
- handler
- the result handler 
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        batchWithParamsFuture(sqlStatement: String, args: Buffer[JsonArray]): Future[Buffer[Int]]
      
      
      Like batchWithParams but returns a scala.concurrent.Future instead of taking an AsyncResultHandler. 
- 
      
      
      
        
      
    
      
        
        def
      
      
        call(sql: String, resultHandler: Handler[AsyncResult[ResultSet]]): SQLConnection
      
      
      Calls the given SQL PROCEDUREwhich returns the result from the procedure.Calls the given SQL PROCEDUREwhich returns the result from the procedure. * @param sql the SQL to execute. For example{call getEmpName`.- resultHandler
- the handler which is called once the operation completes. It will return a - ResultSet.
 - Definition Classes
- SQLConnection → SQLOperations
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        callFuture(sql: String): Future[ResultSet]
      
      
      Like call but returns a scala.concurrent.Future instead of taking an AsyncResultHandler. Like call but returns a scala.concurrent.Future instead of taking an AsyncResultHandler. - Definition Classes
- SQLConnection → SQLOperations
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        callWithParams(sql: String, params: JsonArray, outputs: JsonArray, resultHandler: Handler[AsyncResult[ResultSet]]): SQLConnection
      
      
      Calls the given SQL PROCEDUREwhich returns the result from the procedure.Calls the given SQL PROCEDUREwhich 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"] * @param 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.
 - Definition Classes
- SQLConnection → SQLOperations
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        callWithParamsFuture(sql: String, params: JsonArray, outputs: JsonArray): Future[ResultSet]
      
      
      Like callWithParams but returns a scala.concurrent.Future instead of taking an AsyncResultHandler. Like callWithParams but returns a scala.concurrent.Future instead of taking an AsyncResultHandler. - Definition Classes
- SQLConnection → SQLOperations
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        clone(): AnyRef
      
      
      - Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
 
- 
      
      
      
        
      
    
      
        
        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. 
- 
      
      
      
        
      
    
      
        
        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. * @param handler the handler called when this operation completes. 
- 
      
      
      
        
      
    
      
        
        def
      
      
        closeFuture(): Future[Unit]
      
      
      Like close but returns a scala.concurrent.Future instead of taking an AsyncResultHandler. 
- 
      
      
      
        
      
    
      
        
        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. * @param handler the handler called when this operation completes. 
- 
      
      
      
        
      
    
      
        
        def
      
      
        commitFuture(): Future[Unit]
      
      
      Like commit but returns a scala.concurrent.Future instead of taking an AsyncResultHandler. 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        eq(arg0: AnyRef): Boolean
      
      
      - Definition Classes
- AnyRef
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        equals(arg0: Any): Boolean
      
      
      - Definition Classes
- AnyRef → Any
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        execute(sql: String, resultHandler: Handler[AsyncResult[Unit]]): SQLConnection
      
      
      Executes the given SQL statement * @param sql the SQL to execute. Executes the given SQL statement * @param sql the SQL to execute. For example CREATE TABLE IF EXISTS table ...- resultHandler
- the handler which is called once this operation completes. 
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        executeFuture(sql: String): Future[Unit]
      
      
      Like execute but returns a scala.concurrent.Future instead of taking an AsyncResultHandler. 
- 
      
      
      
        
      
    
      
        
        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
      
      
        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. * @param handler the handler called when this operation completes. 
- 
      
      
      
        
      
    
      
        
        def
      
      
        getTransactionIsolationFuture(): Future[TransactionIsolation]
      
      
      Like getTransactionIsolation but returns a scala.concurrent.Future instead of taking an AsyncResultHandler. 
- 
      
      
      
        
      
    
      
        
        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(sql: String, resultHandler: Handler[AsyncResult[ResultSet]]): SQLConnection
      
      
      Executes the given SQL SELECTstatement which returns the results of the query.Executes the given SQL SELECTstatement which returns the results of the query. * @param sql the SQL to execute. For exampleSELECT * FROM table ....- resultHandler
- the handler which is called once the operation completes. It will return a - ResultSet.
 - Definition Classes
- SQLConnection → SQLOperations
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        queryFuture(sql: String): Future[ResultSet]
      
      
      Like query but returns a scala.concurrent.Future instead of taking an AsyncResultHandler. Like query but returns a scala.concurrent.Future instead of taking an AsyncResultHandler. - Definition Classes
- SQLConnection → SQLOperations
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        querySingle(sql: String, handler: Handler[AsyncResult[Option[JsonArray]]]): SQLOperations
      
      
      Execute a one shot SQL statement that returns a single SQL row. Execute a one shot SQL statement that returns a single SQL row. This method will reduce the boilerplate code by getting a connection from the pool (this object) and return it back after the execution. Only the first result from the result set is returned. * @param sql the statement to execute - handler
- the result handler 
- returns
- self 
 - Definition Classes
- SQLConnection → SQLOperations
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        querySingleFuture(sql: String): Future[Option[JsonArray]]
      
      
      Like querySingle but returns a scala.concurrent.Future instead of taking an AsyncResultHandler. Like querySingle but returns a scala.concurrent.Future instead of taking an AsyncResultHandler. - Definition Classes
- SQLConnection → SQLOperations
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        querySingleWithParams(sql: String, arguments: JsonArray, handler: Handler[AsyncResult[Option[JsonArray]]]): SQLOperations
      
      
      Execute a one shot SQL statement with arguments that returns a single SQL row. Execute a one shot SQL statement with arguments that returns a single SQL row. This method will reduce the boilerplate code by getting a connection from the pool (this object) and return it back after the execution. Only the first result from the result set is returned. * @param sql the statement to execute - arguments
- the arguments 
- handler
- the result handler 
- returns
- self 
 - Definition Classes
- SQLConnection → SQLOperations
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        querySingleWithParamsFuture(sql: String, arguments: JsonArray): Future[Option[JsonArray]]
      
      
      Like querySingleWithParams but returns a scala.concurrent.Future instead of taking an AsyncResultHandler. Like querySingleWithParams but returns a scala.concurrent.Future instead of taking an AsyncResultHandler. - Definition Classes
- SQLConnection → SQLOperations
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        queryStream(sql: String, handler: Handler[AsyncResult[SQLRowStream]]): SQLConnection
      
      
      Executes the given SQL SELECTstatement which returns the results of the query as a read stream.Executes the given SQL SELECTstatement which returns the results of the query as a read stream. * @param sql the SQL to execute. For exampleSELECT * FROM table ....- handler
- the handler which is called once the operation completes. It will return a - SQLRowStream.
 - Definition Classes
- SQLConnection → SQLOperations
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        queryStreamFuture(sql: String): Future[SQLRowStream]
      
      
      Like queryStream but returns a scala.concurrent.Future instead of taking an AsyncResultHandler. Like queryStream but returns a scala.concurrent.Future instead of taking an AsyncResultHandler. - Definition Classes
- SQLConnection → SQLOperations
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        queryStreamWithParams(sql: String, params: JsonArray, handler: Handler[AsyncResult[SQLRowStream]]): SQLConnection
      
      
      Executes the given SQL SELECTstatement which returns the results of the query as a read stream.Executes the given SQL SELECTstatement which returns the results of the query as a read stream. * @param sql the SQL to execute. For exampleSELECT * 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.
 - Definition Classes
- SQLConnection → SQLOperations
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        queryStreamWithParamsFuture(sql: String, params: JsonArray): Future[SQLRowStream]
      
      
      Like queryStreamWithParams but returns a scala.concurrent.Future instead of taking an AsyncResultHandler. Like queryStreamWithParams but returns a scala.concurrent.Future instead of taking an AsyncResultHandler. - Definition Classes
- SQLConnection → SQLOperations
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        queryWithParams(sql: String, params: JsonArray, resultHandler: Handler[AsyncResult[ResultSet]]): SQLConnection
      
      
      Executes the given SQL SELECTprepared statement which returns the results of the query.Executes the given SQL SELECTprepared statement which returns the results of the query. * @param sql the SQL to execute. For exampleSELECT * 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.
 - Definition Classes
- SQLConnection → SQLOperations
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        queryWithParamsFuture(sql: String, params: JsonArray): Future[ResultSet]
      
      
      Like queryWithParams but returns a scala.concurrent.Future instead of taking an AsyncResultHandler. Like queryWithParams but returns a scala.concurrent.Future instead of taking an AsyncResultHandler. - Definition Classes
- SQLConnection → SQLOperations
 
- 
      
      
      
        
      
    
      
        
        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. * @param handler the handler called when this operation completes. 
- 
      
      
      
        
      
    
      
        
        def
      
      
        rollbackFuture(): Future[Unit]
      
      
      Like rollback but returns a scala.concurrent.Future instead of taking an AsyncResultHandler. 
- 
      
      
      
        
      
    
      
        
        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. * @param autoCommit the autoCommit flag, true by default. - resultHandler
- the handler which is called once this operation completes. 
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        setAutoCommitFuture(autoCommit: Boolean): Future[Unit]
      
      
      Like setAutoCommit but returns a scala.concurrent.Future instead of taking an AsyncResultHandler. 
- 
      
      
      
        
      
    
      
        
        def
      
      
        setOptions(options: SQLOptions): SQLConnection
      
      
      Sets the desired options to be applied to the current connection when statements are executed. Sets the desired options to be applied to the current connection when statements are executed. The options are not applied globally but applicable to the current connection. For example changing the transaction isolation level will only affect statements run on this connection and not future or current connections acquired from the connection pool. This method is not async in nature since the apply will only happen at the moment a query is run. * @param options the options to modify the unwrapped connection. see SQLOptions 
- 
      
      
      
        
      
    
      
        
        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. * @param timeoutInSeconds the max amount of seconds the query can take to execute. 
- 
      
      
      
        
      
    
      
        
        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. * @param isolation the level of isolation - handler
- the handler called when this operation completes. 
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        setTransactionIsolationFuture(isolation: TransactionIsolation): Future[Unit]
      
      
      Like setTransactionIsolation but returns a scala.concurrent.Future instead of taking an AsyncResultHandler. 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        synchronized[T0](arg0: ⇒ T0): T0
      
      
      - Definition Classes
- AnyRef
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        toString(): String
      
      
      - Definition Classes
- AnyRef → Any
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        update(sql: String, resultHandler: Handler[AsyncResult[UpdateResult]]): SQLConnection
      
      
      Executes the given SQL statement which may be an INSERT,UPDATE, orDELETEstatement.Executes the given SQL statement which may be an INSERT,UPDATE, orDELETEstatement. * @param sql the SQL to execute. For exampleINSERT INTO table ...- resultHandler
- the handler which is called once the operation completes. 
 - Definition Classes
- SQLConnection → SQLOperations
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        updateFuture(sql: String): Future[UpdateResult]
      
      
      Like update but returns a scala.concurrent.Future instead of taking an AsyncResultHandler. Like update but returns a scala.concurrent.Future instead of taking an AsyncResultHandler. - Definition Classes
- SQLConnection → SQLOperations
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        updateWithParams(sql: String, params: JsonArray, resultHandler: Handler[AsyncResult[UpdateResult]]): SQLConnection
      
      
      Executes the given prepared statement which may be an INSERT,UPDATE, orDELETEstatement with the given parameters * @param sql the SQL to execute.Executes the given prepared statement which may be an INSERT,UPDATE, orDELETEstatement with the given parameters * @param sql the SQL to execute. For exampleINSERT INTO table ...- params
- these are the parameters to fill the statement. 
- resultHandler
- the handler which is called once the operation completes. 
 - Definition Classes
- SQLConnection → SQLOperations
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        updateWithParamsFuture(sql: String, params: JsonArray): Future[UpdateResult]
      
      
      Like updateWithParams but returns a scala.concurrent.Future instead of taking an AsyncResultHandler. Like updateWithParams but returns a scala.concurrent.Future instead of taking an AsyncResultHandler. - Definition Classes
- SQLConnection → SQLOperations
 
- 
      
      
      
        
      
    
      
        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( ... )