All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class twz1.jdbc.mysql.jdbcMysqlConnex

java.lang.Object
   |
   +----twz1.jdbc.mysql.jdbcMysqlConnex

public final class jdbcMysqlConnex
extends Object
implements Connection

Variable Index

 o broken
boolean broken
 o catalog
The "database" or catalog
 o clientCapabilities
Can we send long passwords
 o clientProtocol
The client protocol number
 o connexTimeout
Connection wait timeout
 o curl
The url properties.
 o dbmdConnections
Derived DatabaseMetaData connections
 o errs
 o guard
My thread prophylactic
 o hashSeed
The password hash seed.
 o host
The host
 o inBag
Input buffer for the socket
 o multipleQueries
Do I allow multiple queries?
 o myOID
My object id
 o open
Am I open??
 o outBag
Output buffer.
 o password
The password
 o port
The port.
 o serverThreadID
The client threadid.
 o serverVersion
The server version name.
 o socket
Our socket for connection.
 o socketInput
The socket input stream
 o socketOutput
The socket output stream;
 o sockSO_LINGER
 o sockTCP_NODELAY
Socket parms
 o sockTimeout
 o user
The user
 o xOptions
Extra connection options

Constructor Index

 o jdbcMysqlConnex(jdbcMysqlURL)
The connection constructor.

Method Index

 o addDBMDconnex(jdbcMysqlConnex)
 o clearWarnings()
Currently we return null, later I shall implement warnings to pass back the error stack.
 o close()
Close the connection.
 o closeMe()
The close function to attempt to shutdown gracefully.
 o commit()
Transactions are not supported in MySQL.
Oops, in dbmd docs say commit should be a noop.
 o createStatement()
Create a statement to talk to the database.
 o errHandlerE(int, Exception)
 o errHandlerL(int, String)
 o errHandlerM(int, String, Exception)
 o errHandlerPS(int, String)
 o getAutoCommit()
Transactions are not supported in MySQL.
 o getCatalog()
Get the current catalog, aka "database" in MySQL.
 o getInBag()
Get input bag
 o getMetaData()
DatabaseMetaData is not yet supported, but probably will be fairly soon, though most of its methods will be exceptional.
 o getOutBag()
 o getProperty(String)
 o getTransactionIsolation()
Transactions are not supported in MySQL.
 o getWarnings()
Currently we return null, later I shall implement warnings to pass back the error stack.
 o hashPassword(String)
Hash password, stolen almost verbatim from monty's code.
 o isClosed()
API: return connection status.
 o iSetCat(String)
 o isMultipleQuery()
is multiple query ?
 o isReadOnly()
Read only connections are not supported by MySQL.
 o lock(boolean, int, int)
Invoke a mutex to protect access to the connex after first checking whether multiple connections are allowed and throwing a fit if not and already connected.
 o nativeSQL(String)
As we don't do any translation on the query this just bounces back the parameter.
 o prepareCall(String)
MySQL doesn't do callables.
 o prepareStatement(String)
Initiate prepared statement.
 o rollback()
Transactions are not supported in MySQL.
 o scramble()
More of Monty's scrambled eggs encryption.
 o setAutoCommit(boolean)
Transactions are not supported in MySQL.
 o setCatalog(String)
Set the catalog, i.e "database" in MySQL talk.
 o setMultipleQuery(boolean)
Set multiple queries
 o setProperty(String, String)
 o setReadDump(boolean)
Set a read dump
 o setReadOnly(boolean)
Read only connections are not supported by MySQL.
 o setTransactionIsolation(int)
Transactions are not supported in MySQL.
 o setWriteDump(boolean)
Set a write dump
 o testOpen(String)
 o xOpen()

Variables

 o curl
 jdbcMysqlURL curl
The url properties.

 o open
 boolean open
Am I open??

 o host
 String host
The host

 o port
 int port
The port.

 o catalog
 String catalog
The "database" or catalog

 o user
 String user
The user

 o password
 String password
The password

 o socket
 Socket socket
Our socket for connection.

 o socketInput
 BufferedInputStream socketInput
The socket input stream

 o socketOutput
 BufferedOutputStream socketOutput
The socket output stream;

 o multipleQueries
 boolean multipleQueries
Do I allow multiple queries?

 o inBag
 jdbcMysqlBag inBag
Input buffer for the socket

 o outBag
 jdbcMysqlBag outBag
Output buffer.

 o clientProtocol
 int clientProtocol
The client protocol number

 o clientCapabilities
 int clientCapabilities
Can we send long passwords

 o serverVersion
 String serverVersion
The server version name.

 o serverThreadID
 int serverThreadID
The client threadid.

 o hashSeed
 String hashSeed
The password hash seed.

 o guard
 jdbcMysqlMutex guard
My thread prophylactic

 o myOID
 int myOID
My object id

 o xOptions
 int xOptions
Extra connection options

 o sockTCP_NODELAY
 int sockTCP_NODELAY
Socket parms

 o sockSO_LINGER
 int sockSO_LINGER
 o sockTimeout
 int sockTimeout
 o connexTimeout
 int connexTimeout
Connection wait timeout

 o dbmdConnections
 Vector dbmdConnections
Derived DatabaseMetaData connections

 o broken
 boolean broken
boolean broken

 o errs
 static final String errs[]

Constructors

 o jdbcMysqlConnex
 jdbcMysqlConnex(jdbcMysqlURL jurl) throws SQLException
The connection constructor.

Parameters:
jurl - a URL/hashtable/properties list.

Methods

 o xOpen
 void xOpen() throws SQLException
 o setReadDump
 void setReadDump(boolean t) throws SQLException
Set a read dump

 o setWriteDump
 void setWriteDump(boolean t) throws SQLException
Set a write dump

 o setMultipleQuery
 void setMultipleQuery(boolean t) throws SQLException
Set multiple queries

 o isMultipleQuery
 boolean isMultipleQuery() throws SQLException
is multiple query ?

 o getInBag
 jdbcMysqlBag getInBag() throws SQLException
Get input bag

 o getOutBag
 jdbcMysqlBag getOutBag() throws SQLException
 o testOpen
 private void testOpen(String s) throws SQLException
 o getProperty
 String getProperty(String name)
 o setProperty
 void setProperty(String n,
                  String v)
 o addDBMDconnex
 void addDBMDconnex(jdbcMysqlConnex dbcx)
 o lock
 boolean lock(boolean lockOnOff,
              int oid,
              int timeout) throws SQLException
Invoke a mutex to protect access to the connex after first checking whether multiple connections are allowed and throwing a fit if not and already connected.

Parameters:
lockOnOff - set or clear the mutex.
oid - Object setting the lock.
timeout - time (seconds) to wait before tossing cookies.
 o closeMe
 void closeMe()
The close function to attempt to shutdown gracefully.

 o close
 public void close() throws SQLException
Close the connection.

 o isClosed
 public boolean isClosed() throws SQLException
API: return connection status.

 o setCatalog
 public void setCatalog(String c) throws SQLException
Set the catalog, i.e "database" in MySQL talk.

 o iSetCat
 private void iSetCat(String c) throws SQLException
 o createStatement
 public Statement createStatement() throws SQLException
Create a statement to talk to the database.

 o getCatalog
 public String getCatalog() throws SQLException
Get the current catalog, aka "database" in MySQL.

 o clearWarnings
 public void clearWarnings() throws SQLException
Currently we return null, later I shall implement warnings to pass back the error stack.

 o getWarnings
 public SQLWarning getWarnings() throws SQLException
Currently we return null, later I shall implement warnings to pass back the error stack.

 o getTransactionIsolation
 public int getTransactionIsolation() throws SQLException
Transactions are not supported in MySQL.

 o setTransactionIsolation
 public void setTransactionIsolation(int l) throws SQLException
Transactions are not supported in MySQL.

 o rollback
 public void rollback() throws SQLException
Transactions are not supported in MySQL.

 o commit
 public void commit() throws SQLException
Transactions are not supported in MySQL.
Oops, in dbmd docs say commit should be a noop.

 o getAutoCommit
 public boolean getAutoCommit() throws SQLException
Transactions are not supported in MySQL.

 o setAutoCommit
 public void setAutoCommit(boolean s) throws SQLException
Transactions are not supported in MySQL.

 o setReadOnly
 public void setReadOnly(boolean s) throws SQLException
Read only connections are not supported by MySQL. If there is a call for it I may implement support through this driver in the future.

 o isReadOnly
 public boolean isReadOnly() throws SQLException
Read only connections are not supported by MySQL. If there is a call for it I may implement support through this driver in the future.

Returns:
always false.
 o getMetaData
 public DatabaseMetaData getMetaData() throws SQLException
DatabaseMetaData is not yet supported, but probably will be fairly soon, though most of its methods will be exceptional.

 o nativeSQL
 public String nativeSQL(String s) throws SQLException
As we don't do any translation on the query this just bounces back the parameter.

 o prepareCall
 public CallableStatement prepareCall(String s) throws SQLException
MySQL doesn't do callables.

 o prepareStatement
 public PreparedStatement prepareStatement(String s) throws SQLException
Initiate prepared statement.

 o errHandlerL
 private void errHandlerL(int n,
                          String s) throws SQLException
 o errHandlerPS
 private void errHandlerPS(int n,
                           String s) throws SQLException
 o errHandlerM
 private void errHandlerM(int n,
                          String s,
                          Exception e) throws SQLException
 o errHandlerE
 private void errHandlerE(int n,
                          Exception e) throws SQLException
 o hashPassword
 private long[] hashPassword(String pass)
Hash password, stolen almost verbatim from monty's code.

 o scramble
 private byte[] scramble()
More of Monty's scrambled eggs encryption.


All Packages  Class Hierarchy  This Package  Previous  Next  Index