Class SQLRConnection
In: sqlrelay.C
Parent: Object

Methods

Public Class methods

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.

Public Instance methods

Instructs the database to wait for the client to tell it when to commit.

Instructs the database to perform a commit after every successful query.

Returns a string representing the format of the bind variables used in the db.

Returns the version of the sqlrelay client software.

Issues a commit. Returns 1 if the commit succeeded, 0 if it failed and -1 if an error occurred.

Returns the version of the database

Turns debugging off.

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"

Ends the session.

If an operation failed and generated an error, the error message is available here. If there is no error then this method returns nil

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

Returns the database/schema that is currently in use.

Returns 0 if debugging is off and 1 if debugging is on.

Returns the value of the autoincrement column for the last insert

Returns the type of database: oracle8, postgresql, mysql, etc.

Returns 1 if the database is up and 0 if it‘s down.

Resumes a session previously left open using sqlrcon_suspendSession(). Returns 1 on success and 0 on failure.

Issues a rollback. Returns 1 if the rollback succeeded, 0 if it failed and -1 if an error occurred.

Sets the current database/schema to "database"

Returns the version of the sqlrelay server software.

Sets the server connect timeout in seconds and milliseconds. Setting either parameter to -1 disables the timeout.

Disconnects this connection from the current session but leaves the session open so that another connection can connect to it using sqlrcon_resumeSession().

[Validate]