-
Notifications
You must be signed in to change notification settings - Fork 397
Expand file tree
/
Copy pathDatabaseProvider.java
More file actions
60 lines (49 loc) · 1.62 KB
/
DatabaseProvider.java
File metadata and controls
60 lines (49 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package sqlancer;
import sqlancer.common.log.LoggableFactory;
public interface DatabaseProvider<G extends GlobalState<O, ?, C>, O extends DBMSSpecificOptions<?>, C extends SQLancerDBConnection> {
/**
* Gets the the {@link GlobalState} class.
*
* @return the class extending {@link GlobalState}
*/
Class<G> getGlobalStateClass();
/**
* Gets the JCommander option class.
*
* @return the class representing the DBMS-specific options.
*/
Class<O> getOptionClass();
/**
* Generates a single database and executes a test oracle a given number of times.
*
* @param globalState
* the state created and is valid for this method call.
*
* @return Reproducer if a bug is found and a reproducer is available.
*
* @throws Exception
* if creating the database fails.
*
*/
Reproducer<G> generateAndTestDatabase(G globalState) throws Exception;
/**
* The experimental feature: Query Plan Guidance.
*
* @param globalState
* the state created and is valid for this method call.
*
* @throws Exception
* if testing fails.
*
*/
void generateAndTestDatabaseWithQueryPlanGuidance(G globalState) throws Exception;
C createDatabase(G globalState) throws Exception;
/**
* The DBMS name is used to name the log directory and command to test the respective DBMS.
*
* @return the DBMS' name
*/
String getDBMSName();
LoggableFactory getLoggableFactory();
StateToReproduce getStateToReproduce(String databaseName);
}