Class | SQLRConnection |
In: |
sqlrelay.cpp
|
Parent: | Object |
Initiates a connection to "host" on "port" or to the unix "socket" on the local machine and authenticates with "user" and "password". Failed connections will be retried for "tries" times on interval "retrytime". If "tries" is 0 then retries will continue forever. If "retrytime" is 0 then retries will be attempted on a default interval. If the "socket" parameter is nether nil nor "" then an attempt will be made to connect through it before attempting to connect to "host" on "port". If it is nil or "" then no attempt will be made to connect through the socket.
Causes verbose debugging information to be sent to standard output. Another way to do this is to start a query with "— debug\n". Yet another way is to set the environment variable SQLRDEBUG to "ON"
If an operation failed and generated an error, the error message is available here. If there is no error then this method returns nil
If an operation failed and generated an error, the error number is available here. If there is no error then this method returns 0.
Returns the inet port that the connection is communicating over. This parameter may be passed to another connection for use in the sqlrcon_resumeSession() command. Note: The result this function returns is only valid after a call to suspendSession().
Returns the unix socket that the connection is communicating over. This parameter may be passed to another connection for use in the sqlrcon_resumeSession() command. Note: The result this function returns is only valid after a call to suspendSession().
Resumes a session previously left open using sqlrcon_suspendSession(). Returns 1 on success and 0 on failure.
Sets the server connect timeout in seconds and milliseconds. Setting either parameter to -1 disables the timeout.