MySQLConnection

A connection to MySQL server.

Members

Functions

changeUser
MySQLConnection changeUser(MySQLConnectOptions options, AsyncVoidHandler handler)

Send a CHANGE_USER command to change the user of the current connection, this operation will also reset connection state.

dumpDebug
MySQLConnection dumpDebug(AsyncVoidHandler handler)

Send a DEBUG command to dump debug information to the server's stdout.

getInternalStatistics
MySQLConnection getInternalStatistics(AsyncResultHandler!(string) handler)

Send a STATISTICS command to get a human readable string of the server internal status.

ping
MySQLConnection ping(AsyncVoidHandler handler)

Send a PING command to check if the server is alive.

resetConnection
MySQLConnection resetConnection(AsyncVoidHandler handler)

Send a RESET_CONNECTION command to reset the session state.

setOption
MySQLConnection setOption(MySQLSetOption option, AsyncVoidHandler handler)

Send a SET_OPTION command to set options for the current connection.

specifySchema
MySQLConnection specifySchema(string schemaName, AsyncVoidHandler handler)

Send a INIT_DB command to change the default schema of the connection.

Inherited Members

From SqlConnection

exceptionHandler
SqlConnection exceptionHandler(ExceptionHandler handler)

Set an handler called with connection errors.

closeHandler
SqlConnection closeHandler(VoidHandler handler)

Set an handler called when the connection is closed.

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.
isSSL
bool isSSL()

@return whether the connection uses SSL

isConnected
bool isConnected()
Undocumented in source.
close
void close()

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

query
SqlConnection query(string sql, RowSetHandler handler)
Undocumented in source.
query
alias query = SqlClient.query
Undocumented in source.
prepare
SqlConnection prepare(string sql, PreparedQueryHandler handler)

Create a prepared query.

prepareAsync
Future!PreparedQuery prepareAsync(string sql)
Undocumented in source.
prepare
PreparedQuery prepare(string sql)
Undocumented in source.
preparedQuery
SqlConnection preparedQuery(string sql, RowSetHandler handler)
preparedQuery
SqlConnection preparedQuery(string sql, Tuple arguments, RowSetHandler handler)
Undocumented in source.
prepareNamedQueryAsync
Future!NamedQuery prepareNamedQueryAsync(string sql)
prepareNamedQuery
NamedQuery prepareNamedQuery(string sql)
Undocumented in source.
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.

Meta