dsql
Class Connect

java.lang.Object
  extended bydsql.DMExecuted
      extended bydsql.Connect

public class Connect
extends DMExecuted

Stores run-time metadata about a driver/database, and manages new connections. There is a corresponding instance of this class for each <connect> element. The code is optimised to minimise the open connections and calls to get metadata (if supported by the driver)


Constructor Summary
Connect(java.lang.String _id, ASTDriver driver, java.lang.String _cString, ASTUserName _userName, ASTPassword _password)
           
 
Method Summary
 int canReadRandomColumns()
           
 boolean checkResultSetType()
           
 void closeStatement()
           
 boolean computeDisplaySize()
           
 Value execute(ASTSQL sqlObj, java.lang.String sql)
           
protected  ConnectStmt getConnection()
           
 java.lang.String getDriverId()
           
 java.lang.String getId()
           
protected  java.sql.DatabaseMetaData getMetadata()
           
 java.lang.String[] getPrimaryKeys(java.lang.String catalog, java.lang.String schema, java.lang.String table)
           
protected  ConnectStmt openConnection()
          Add an entry in the connection vector and returns the connection object
 java.sql.Statement openStatement()
           
 void setCanReadRandomColumns(int c)
           
protected  void setDriverMetadata(ASTDriver driver)
           
protected  void setMetadata()
          Get connection metadata; will be called just once per Connect object
 boolean supportsConnMetaData()
           
 boolean supportsMultipleResultSets()
           
 boolean supportsMultipleStatements()
           
 int supportsScrollCursor()
           
 boolean supportsUpdatableSets()
           
 
Methods inherited from class dsql.DMExecuted
getCaller, setCaller
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Connect

public Connect(java.lang.String _id,
               ASTDriver driver,
               java.lang.String _cString,
               ASTUserName _userName,
               ASTPassword _password)
Method Detail

getId

public java.lang.String getId()

getDriverId

public java.lang.String getDriverId()

execute

public Value execute(ASTSQL sqlObj,
                     java.lang.String sql)
              throws ExecuteException
Throws:
ExecuteException

supportsMultipleResultSets

public boolean supportsMultipleResultSets()

supportsMultipleStatements

public boolean supportsMultipleStatements()

checkResultSetType

public boolean checkResultSetType()

supportsConnMetaData

public boolean supportsConnMetaData()

supportsUpdatableSets

public boolean supportsUpdatableSets()

computeDisplaySize

public boolean computeDisplaySize()

canReadRandomColumns

public int canReadRandomColumns()

supportsScrollCursor

public int supportsScrollCursor()

setCanReadRandomColumns

public void setCanReadRandomColumns(int c)

closeStatement

public void closeStatement()
                    throws ExecuteException
Throws:
ExecuteException

openStatement

public java.sql.Statement openStatement()
                                 throws ExecuteException
Throws:
ExecuteException

getPrimaryKeys

public java.lang.String[] getPrimaryKeys(java.lang.String catalog,
                                         java.lang.String schema,
                                         java.lang.String table)
                                  throws ExecuteException
Throws:
ExecuteException

getConnection

protected ConnectStmt getConnection()
                             throws ExecuteException
Throws:
ExecuteException

openConnection

protected ConnectStmt openConnection()
                              throws ExecuteException
Add an entry in the connection vector and returns the connection object

Throws:
ExecuteException

getMetadata

protected java.sql.DatabaseMetaData getMetadata()
                                         throws ExecuteException
Throws:
ExecuteException

setMetadata

protected void setMetadata()
                    throws ExecuteException
Get connection metadata; will be called just once per Connect object

Throws:
ExecuteException

setDriverMetadata

protected void setDriverMetadata(ASTDriver driver)
                          throws ExecuteException
Throws:
ExecuteException