Class SQLDataSource

java.lang.Object
fr.inria.rules.integraal.views.datasource.AbstractDataSource<String, List<Object[]>>
fr.inria.rules.integraal.views.datasource.SQLDataSource
All Implemented Interfaces:
QueryableData, DataSource<String, List<Object[]>>

public class SQLDataSource extends AbstractDataSource<String, List<Object[]>>
Access to a datasource using SQL queries
Author:
Florent Tornil
  • Constructor Details

    • SQLDataSource

      public SQLDataSource(RDBMSDriver driver) throws SQLException
      Create a new datasource on a RDBMS
      Parameters:
      driver - the SQL driver
      Throws:
      SQLException - if an error occur
  • Method Details

    • estimateBound

      public Optional<Long> estimateBound(BasicQuery query)
      Description copied from interface: QueryableData
      Estimate the number of answers to a query The estimation is the upper bound, meaning the actual number of answers will not exceed this number. Implementations may return an empty Optional if they cannot provide an estimation.
      Specified by:
      estimateBound in interface QueryableData
      Overrides:
      estimateBound in class AbstractDataSource<String, List<Object[]>>
      Parameters:
      query - the query for which we want to know the upper bound
      Returns:
      an Optional containing the estimated upper bound of answers, or an empty Optional if estimation is not possible
    • getSupportedOperations

      public Collection<OperationsSupported> getSupportedOperations()
      Returns:
      the set of operations and optimizations that are supported by the datasource