|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.firstworks.sqlrelay.SQLRConnection
public class SQLRConnection
Field Summary | |
---|---|
long |
connection
connection is used internally, it's just public to make the JNI wrapper work faster. |
Constructor Summary | |
---|---|
SQLRConnection(java.lang.String server,
short port,
java.lang.String socket,
java.lang.String user,
java.lang.String password,
int retrytime,
int tries)
Initiates a connection to "server" on "port" or to the unix "socket" on the local machine and authenticates with "user" and "password". |
Method Summary | |
---|---|
boolean |
autoCommitOff()
Instructs the database to wait for the client to tell it when to commit. |
boolean |
autoCommitOn()
Instructs the database to perform a commit after every successful query. |
java.lang.String |
bindFormat()
Returns a string representing the format of the bind variables used in the db. |
java.lang.String |
clientVersion()
Returns the version of the sqlrelay client software |
boolean |
commit()
Issues a commit. |
java.lang.String |
dbVersion()
Returns the version of the database |
void |
debugOff()
Turns debugging off. |
void |
debugOn()
Causes verbose debugging information to be sent to standard output. |
void |
delete()
Disconnects and ends the session if it hasn't been ended already. |
void |
endSession()
Ends the session. |
java.lang.String |
errorMessage()
If an operation failed and generated an error, the error message is available here. |
short |
getConnectionPort()
Returns the inet port that the connection is communicating over. |
java.lang.String |
getConnectionSocket()
Returns the unix socket that the connection is communicating over. |
java.lang.String |
getCurrentDatabase()
Returns the database/schema that is currently in use |
boolean |
getDebug()
Returns 0 if debugging is off and 1 if debugging is on. |
long |
getLastInsertId()
Returns the value of the autoincrement column for the last insert |
java.lang.String |
identify()
Returns the type of database: oracle8, postgresql, mysql, etc. |
boolean |
ping()
Returns 1 if the database is up and 0 if it's down. |
boolean |
resumeSession(short port,
java.lang.String socket)
Resumes a session previously left open using suspendSession(). |
boolean |
rollback()
Issues a rollback. |
boolean |
selectDatabase(java.lang.String database)
Sets the current database/schema to "database" |
java.lang.String |
serverVersion()
Returns the version of the sqlrelay server software |
void |
setTimeout(int timeoutsec,
int timeoutusec)
Sets the server connect timeout in seconds and milliseconds. |
boolean |
suspendSession()
Disconnects this connection from the current session but leaves the session open so that another connection can connect to it using resumeSession(). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public long connection
Constructor Detail |
---|
public SQLRConnection(java.lang.String server, short port, java.lang.String socket, java.lang.String user, java.lang.String password, int retrytime, int tries)
Method Detail |
---|
public void delete()
public void setTimeout(int timeoutsec, int timeoutusec)
public void endSession()
public boolean suspendSession()
public short getConnectionPort()
public java.lang.String getConnectionSocket()
public boolean resumeSession(short port, java.lang.String socket)
public boolean ping()
public java.lang.String identify()
public java.lang.String dbVersion()
public java.lang.String serverVersion()
public java.lang.String clientVersion()
public java.lang.String bindFormat()
public boolean selectDatabase(java.lang.String database)
public java.lang.String getCurrentDatabase()
public long getLastInsertId()
public boolean autoCommitOn()
public boolean autoCommitOff()
public boolean commit()
public boolean rollback()
public java.lang.String errorMessage()
public void debugOn()
public void debugOff()
public boolean getDebug()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |