Class DatabaseConnection

java.lang.Object
weka.experiment.DatabaseUtils
weka.core.converters.DatabaseConnection
All Implemented Interfaces:
Serializable, RevisionHandler

public class DatabaseConnection extends DatabaseUtils
Connects to a database.
Version:
$Revision: 1.8 $
Author:
Len Trigg (trigg@cs.waikato.ac.nz), Stefan Mutter (mutter@cs.waikato.ac.nz)
See Also:
  • Constructor Details

    • DatabaseConnection

      public DatabaseConnection() throws Exception
      Sets up the database drivers
      Throws:
      Exception - if an error occurs
  • Method Details

    • getUpperCase

      public boolean getUpperCase()
      Check if the property checkUpperCaseNames in the DatabaseUtils file is set to true or false.
      Returns:
      true if the property checkUpperCaseNames in the DatabaseUtils file is set to true, false otherwise.
    • getMetaData

      public DatabaseMetaData getMetaData() throws Exception
      Gets meta data for the database connection object.
      Returns:
      the meta data.
      Throws:
      Exception - if an error occurs
    • getUpdateCount

      public int getUpdateCount() throws SQLException
      Dewtermines if the current query retrieves a result set or updates a table
      Returns:
      the update count (-1 if the query retrieves a result set).
      Throws:
      SQLException - if an error occurs
    • getRevision

      public String getRevision()
      Returns the revision string.
      Specified by:
      getRevision in interface RevisionHandler
      Overrides:
      getRevision in class DatabaseUtils
      Returns:
      the revision