Class HSQLDBDriver

java.lang.Object
fr.inria.rules.integraal.storage.external.rdbms.driver.HSQLDBDriver
All Implemented Interfaces:
RDBMSDriver

public class HSQLDBDriver extends Object implements RDBMSDriver
Driver for HSQLDB databases
  • Constructor Details

    • HSQLDBDriver

      public HSQLDBDriver(String alias) throws SQLException
      Creates a new driver using the given alias This represents a new memory database
      Parameters:
      alias - of the database
      Throws:
      SQLException - iff some error occur
    • HSQLDBDriver

      public HSQLDBDriver(String url, String alias) throws SQLException
      Creates a new driver using the given alias This represents a new memory database
      Parameters:
      url - of the database
      alias - of the database
      Throws:
      SQLException - iff some error occur
  • Method Details

    • getDatasource

      public DataSource getDatasource()
      Description copied from interface: RDBMSDriver
      Returns the data source handled by this driver.
      Specified by:
      getDatasource in interface RDBMSDriver
      Returns:
      the DataSource represented by this driver
    • getBaseSafeInsertQuery

      public String getBaseSafeInsertQuery()
      Description copied from interface: RDBMSDriver
      Returns the base safe INSERT query template.
      Specified by:
      getBaseSafeInsertQuery in interface RDBMSDriver
      Returns:
      the base INSERT query which does not create exceptions in case of duplicates corresponding to this driver
    • getBaseSafeInsertSelectQuery

      public String getBaseSafeInsertSelectQuery()
      Description copied from interface: RDBMSDriver
      Returns the safe INSERT-SELECT query template.
      Specified by:
      getBaseSafeInsertSelectQuery in interface RDBMSDriver
      Returns:
      the base INSERT query using a SELECT clause which does not create exceptions in case of duplicates corresponding to this driver
    • getTextFieldName

      public String getTextFieldName()
      Description copied from interface: RDBMSDriver
      Returns the SQL text-column type name used by this driver.
      Specified by:
      getTextFieldName in interface RDBMSDriver
      Returns:
      the name of the Text field corresponding to this driver
    • getNumberFieldName

      public String getNumberFieldName()
      Description copied from interface: RDBMSDriver
      Returns the SQL numeric-column type name used by this driver.
      Specified by:
      getNumberFieldName in interface RDBMSDriver
      Returns:
      the name of the Number field corresponding to this driver
    • getConnection

      public Connection getConnection()
      Description copied from interface: RDBMSDriver
      A driver may keep a connection open in order to execute queries faster or create a new one each time Returns a JDBC connection to the target database.
      Specified by:
      getConnection in interface RDBMSDriver
      Returns:
      a Connection for the database represented by this driver
    • getJDBCString

      public String getJDBCString()
      Description copied from interface: RDBMSDriver
      Returns the JDBC connection string.
      Specified by:
      getJDBCString in interface RDBMSDriver
      Returns:
      the jdbc connection string
    • getCSVCopyQuery

      public String getCSVCopyQuery(String tableName, String csvFilePath, char delimiter, int headerSize)
      Description copied from interface: RDBMSDriver
      Returns the SQL query used to bulk-copy CSV data.
      Specified by:
      getCSVCopyQuery in interface RDBMSDriver
      Parameters:
      tableName - table name to store data
      csvFilePath - path to the csv file
      delimiter - delimiter of the csv file
      headerSize - size of the csv header
      Returns:
      the query used to copy a CSV file into the database system