com.marklogic.xdbc
Interface XDBCDatabaseMetaData


public interface XDBCDatabaseMetaData

The XDBCXDatabaseMetaData interface returns specific information about the capabilities of the XML database and XDBC driver.


Method Summary
 XDBCConnection getConnection()
          Retrieves the connection that produced this metadata object.
 int getConnectionCount()
          Return the number of XDBCConnection objects currently open by this XDBC driver to the database.
 int getDBMajorVersion()
          Returns the major version of this database product.
 int getDBMinorVersion()
          Return the minor version of this database product.
 int getDefaultTransactionIsolation()
          Return the database's default transaction isolation level.
 int getDriverMajorVersion()
          Return the XDBC driver's major version number.
 int getDriverMinorVersion()
          Return the XDBC driver's minor version number.
 int getStatementCount()
          Return the number of XDBCStatements currently open by this driver to the database.
 String getUserName()
          Return the user name as known to the database.
 boolean isReadOnly()
          Return true exactly when the database is in read-only mode.
 boolean supportsResultSequenceConcurrency(int type)
          Returns true or false depending on whether the specified concurrency level is supported by XDBCResultSequences from the database.
 

Method Detail

getDBMajorVersion

public int getDBMajorVersion()
Returns the major version of this database product.

Returns:
the integer major version of the database.

getDBMinorVersion

public int getDBMinorVersion()
Return the minor version of this database product.

Returns:
the integer minor version of the database.

getDriverMajorVersion

public int getDriverMajorVersion()
Return the XDBC driver's major version number.

Returns:
the integer major version of the XDBC driver.

getDriverMinorVersion

public int getDriverMinorVersion()
Return the XDBC driver's minor version number.

Returns:
the integer minor version of the XDBC driver.

getConnection

public XDBCConnection getConnection()
                             throws XDBCException
Retrieves the connection that produced this metadata object.

Returns:
the XDBCConnection which produced this object.
Throws:
XDBCException - if a database access error occurs.

getDefaultTransactionIsolation

public int getDefaultTransactionIsolation()
Return the database's default transaction isolation level.

Returns:
the integer default transaction isolation level of the database
See Also:
XDBC_TRANSACTION_NONE, XDBC_TRANSACTION_READ_UNCOMMITTED, XDBC_TRANSACTION_READ_COMMITTED, XDBC_TRANSACTION_REPEATABLE_READ, XDBC_TRANSACTION_SERIALIZABLE

getConnectionCount

public int getConnectionCount()
                       throws XDBCException
Return the number of XDBCConnection objects currently open by this XDBC driver to the database.

Returns:
an integer number of active connections.
Throws:
XDBCException - if a database access error occurs.

getStatementCount

public int getStatementCount()
                      throws XDBCException
Return the number of XDBCStatements currently open by this driver to the database.

Returns:
an integer number of active XDBCStatements
Throws:
XDBCException - if a database access error occurs.

getUserName

public String getUserName()
                   throws XDBCException
Return the user name as known to the database.

Returns:
the String user name.
Throws:
XDBCException - if a database access error occurs.

isReadOnly

public boolean isReadOnly()
                   throws XDBCException
Return true exactly when the database is in read-only mode.

Returns:
true if the database is currently in read-only mode; false if it is not in read-only mode.
Throws:
XDBCException - if a database access error occurs.

supportsResultSequenceConcurrency

public boolean supportsResultSequenceConcurrency(int type)
                                          throws XDBCException
Returns true or false depending on whether the specified concurrency level is supported by XDBCResultSequences from the database.

Parameters:
type - the constant concurrency level as defined in XDBCResultSequence.
Returns:
true if the concurrency level is supported; false if not.
Throws:
XDBCException - if a database access error occurs, or if the type parameter is invalid.
See Also:
XDBC_CONCUR_READ_ONLY, XDBC_CONCUR_UPDATABLE