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[]>>
Access to a datasource using SQL queries
- Author:
- Florent Tornil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionestimateBound(BasicQuery query) 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.Methods inherited from class AbstractDataSource
evaluate, evaluate, getAtomicPattern, getName, getPredicates, getViewParameters, hasPredicate, registerView, setNameMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface QueryableData
estimateBound
-
Constructor Details
-
SQLDataSource
Create a new datasource on a RDBMS- Parameters:
driver- the SQL driver- Throws:
SQLException- if an error occur
-
-
Method Details
-
estimateBound
Description copied from interface:QueryableDataEstimate 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:
estimateBoundin interfaceQueryableData- Overrides:
estimateBoundin classAbstractDataSource<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
- Returns:
- the set of operations and optimizations that are supported by the datasource
-