Class: JdbcConnection

vertx-jdbc-js/jdbc_connection~ JdbcConnection

new JdbcConnection()

Represents the JdbcConnection which is obtained from the JdbcService.
Source:

Methods

close(handler)

Closes the connection. Important to always close the connection when you are done so it's returned to the pool.
Parameters:
Name Type Description
handler function
Source:

commit(handler) → {JdbcConnection}

Commits all changes made since the previous commit/rollback.
Parameters:
Name Type Description
handler function
Source:
Returns:
Type
JdbcConnection

execute(sql, resultHandler) → {JdbcConnection}

Executes the given SQL statement
Parameters:
Name Type Description
sql string
resultHandler function
Source:
Returns:
Type
JdbcConnection

query(sql, params, resultHandler) → {JdbcConnection}

Executes the given SQL SELECT statement which returns the results of the query.
Parameters:
Name Type Description
sql string
params todo
resultHandler function
Source:
Returns:
Type
JdbcConnection

rollback(handler) → {JdbcConnection}

Rolls back all changes made since the previous commit/rollback.
Parameters:
Name Type Description
handler function
Source:
Returns:
Type
JdbcConnection

setAutoCommit(autoCommit, resultHandler) → {JdbcConnection}

Sets the auto commit flag for this connection. True by default. Set to false if you want
Parameters:
Name Type Description
autoCommit boolean
resultHandler function
Source:
Returns:
Type
JdbcConnection

update(sql, params, resultHandler) → {JdbcConnection}

Executes the given SQL statement which may be an INSERT, UPDATE, or DELETE statement.
Parameters:
Name Type Description
sql string
params todo
resultHandler function
Source:
Returns:
Type
JdbcConnection