SqlConnection

A connection to database server.

@author <a href="mailto:julien@julienviet.com">Julien Viet</a> @author <a href="mailto:emad.albloushi@gmail.com">Emad Alblueshi</a>

Members

Aliases

query
alias query = SqlClient.query
Undocumented in source.

Functions

begin
Transaction begin()

Begin a transaction and returns a {@link Transaction} for controlling and tracking this transaction. <p/> When the connection is explicitely closed, any inflight transaction is rollbacked.

begin
Transaction begin(bool closeOnEnd)
Undocumented in source.
close
void close()

Close the current connection after all the pending commands have been processed.

closeHandler
SqlConnection closeHandler(VoidHandler handler)

Set an handler called when the connection is closed.

escapeIdentifier
string escapeIdentifier(string identifier)

Return the given string suitably quoted to be used as an identifier in an SQL statement string. Quotes are added only if necessary (i.e., if the string contains non-identifier characters or would be case-folded). Embedded quotes are properly doubled.

escapeLiteral
string escapeLiteral(string literal)

Return the given string suitably quoted to be used as a string literal in an SQL statement string. Embedded single-quotes and backslashes are properly doubled. Note that quote_literal returns null on null input.

exceptionHandler
SqlConnection exceptionHandler(ExceptionHandler handler)

Set an handler called with connection errors.

isConnected
bool isConnected()
Undocumented in source.
isSSL
bool isSSL()

@return whether the connection uses SSL

prepare
SqlConnection prepare(string sql, PreparedQueryHandler handler)

Create a prepared query.

prepare
PreparedQuery prepare(string sql)
Undocumented in source.
prepareAsync
Future!PreparedQuery prepareAsync(string sql)
Undocumented in source.
prepareNamedQuery
NamedQuery prepareNamedQuery(string sql)
Undocumented in source.
prepareNamedQueryAsync
Future!NamedQuery prepareNamedQueryAsync(string sql)
preparedQuery
SqlConnection preparedQuery(string sql, RowSetHandler handler)
preparedQuery
SqlConnection preparedQuery(string sql, Tuple arguments, RowSetHandler handler)
Undocumented in source.
query
SqlConnection query(string sql, RowSetHandler handler)
Undocumented in source.

Inherited Members

From SqlClient

query
SqlClient query(string sql, RowSetHandler handler)

Execute a simple query.

queryAsync
Future!RowSet queryAsync(string sql)
Undocumented in source.
query
RowSet query(string sql)
Undocumented in source.
preparedQuery
SqlClient preparedQuery(string sql, RowSetHandler handler)

Prepare and execute a query.

preparedQuery
SqlClient preparedQuery(string sql, Tuple arguments, RowSetHandler handler)

Prepare and execute a query.

preparedBatch
SqlClient preparedBatch(string sql, List!(Tuple) batch, RowSetHandler handler)

Prepare and execute a createBatch.

close
void close()

Close the client and release the associated resources.

Meta