implicit final class VertxSQLConnectionOps extends AnyVal
- Alphabetic
- By Inheritance
- VertxSQLConnectionOps
- AnyVal
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new VertxSQLConnectionOps(target: SQLConnection)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
batchCallableWithParamsL(sqlStatement: String, inArgs: List[JsonArray], outArgs: List[JsonArray]): Task[List[Integer]]
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
-
def
batchL(sqlStatements: List[String]): Task[List[Integer]]
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
-
def
batchWithParamsL(sqlStatement: String, args: List[JsonArray]): Task[List[Integer]]
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
-
def
callL(sql: String): Task[ResultSet]
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}
.
- See also
java.sql.CallableStatement#execute(String)
-
def
callWithParamsL(sql: String, params: JsonArray, outputs: JsonArray): Task[ResultSet]
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.
- See also
java.sql.CallableStatement#execute(String)
-
def
closeL(): Task[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
commitL(): Task[Unit]
Commits all changes made since the previous commit/rollback.
-
def
executeL(sql: String): Task[Unit]
Executes the given SQL statement
Executes the given SQL statement
- sql
the SQL to execute. For example
CREATE TABLE IF EXISTS table ...
- See also
java.sql.Statement#execute(String)
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
def
getTransactionIsolationL(): Task[TransactionIsolation]
Attempts to return the transaction isolation level for this Connection object to the one given.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
queryL(sql: String): Task[ResultSet]
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 ...
.
- See also
java.sql.Statement#executeQuery(String)
java.sql.PreparedStatement#executeQuery(String)
-
def
querySingleL(sql: String): Task[JsonArray]
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.
- sql
the statement to execute
- returns
self
-
def
querySingleWithParamsL(sql: String, arguments: JsonArray): Task[JsonArray]
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.
- sql
the statement to execute
- arguments
the arguments
- returns
self
-
def
queryStreamL(sql: String): Task[SQLRowStream]
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 ...
.
- See also
java.sql.Statement#executeQuery(String)
java.sql.PreparedStatement#executeQuery(String)
-
def
queryStreamWithParamsL(sql: String, params: JsonArray): Task[SQLRowStream]
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.
- See also
java.sql.Statement#executeQuery(String)
java.sql.PreparedStatement#executeQuery(String)
-
def
queryWithParamsL(sql: String, params: JsonArray): Task[ResultSet]
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.
- See also
java.sql.Statement#executeQuery(String)
java.sql.PreparedStatement#executeQuery(String)
-
def
rollbackL(): Task[Unit]
Rolls back all changes made since the previous commit/rollback.
-
def
setAutoCommitL(autoCommit: Boolean): Task[Unit]
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.
- See also
java.sql.Connection#setAutoCommit(boolean)
-
def
setTransactionIsolationL(isolation: TransactionIsolation): Task[Unit]
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
- val target: SQLConnection
-
def
toString(): String
- Definition Classes
- Any
-
def
updateL(sql: String): Task[UpdateResult]
Executes the given SQL statement which may be an
INSERT
,UPDATE
, orDELETE
statement.Executes the given SQL statement which may be an
INSERT
,UPDATE
, orDELETE
statement.- sql
the SQL to execute. For example
INSERT INTO table ...
- See also
java.sql.Statement#executeUpdate(String)
java.sql.PreparedStatement#executeUpdate(String)
-
def
updateWithParamsL(sql: String, params: JsonArray): Task[UpdateResult]
Executes the given prepared statement which may be an
INSERT
,UPDATE
, orDELETE
statement with the given parametersExecutes the given prepared statement which may be an
INSERT
,UPDATE
, orDELETE
statement with the given parameters- sql
the SQL to execute. For example
INSERT INTO table ...
- params
these are the parameters to fill the statement.
- See also
java.sql.Statement#executeUpdate(String)
java.sql.PreparedStatement#executeUpdate(String)