1 | |
package liquibase.database.core; |
2 | |
|
3 | |
import liquibase.database.AbstractDatabase; |
4 | |
import liquibase.database.DatabaseConnection; |
5 | |
import liquibase.exception.DatabaseException; |
6 | |
|
7 | 12 | public class CacheDatabase extends AbstractDatabase { |
8 | |
public static final String PRODUCT_NAME = "cache"; |
9 | |
|
10 | |
public String getCurrentDateTimeFunction() { |
11 | 1 | if (currentDateTimeFunction != null) { |
12 | 0 | return currentDateTimeFunction; |
13 | |
} |
14 | |
|
15 | 1 | return "SYSDATE"; |
16 | |
} |
17 | |
|
18 | |
public String getDefaultDriver(String url) { |
19 | 1 | if (url.startsWith("jdbc:Cache")) { |
20 | 1 | return "com.intersys.jdbc.CacheDriver"; |
21 | |
} |
22 | 0 | return null; |
23 | |
} |
24 | |
|
25 | |
public int getPriority() { |
26 | 0 | return PRIORITY_DEFAULT; |
27 | |
} |
28 | |
|
29 | |
public String getTypeName() { |
30 | 55 | return "cache"; |
31 | |
} |
32 | |
|
33 | |
public boolean isCorrectDatabaseImplementation(DatabaseConnection conn) throws DatabaseException { |
34 | 1 | return PRODUCT_NAME.equalsIgnoreCase(conn.getDatabaseProductName()); |
35 | |
} |
36 | |
|
37 | |
public boolean supportsInitiallyDeferrableColumns() { |
38 | 1 | return false; |
39 | |
} |
40 | |
|
41 | |
@Override |
42 | |
public String getLineComment() { |
43 | 1 | return "--"; |
44 | |
} |
45 | |
|
46 | |
@Override |
47 | |
protected String getDefaultDatabaseSchemaName() throws DatabaseException { |
48 | 0 | return ""; |
49 | |
} |
50 | |
|
51 | |
@Override |
52 | |
public boolean supportsSequences() { |
53 | 9 | return false; |
54 | |
} |
55 | |
|
56 | |
public boolean supportsTablespaces() { |
57 | 0 | return false; |
58 | |
} |
59 | |
|
60 | |
@Override |
61 | |
public boolean supportsAutoIncrement() { |
62 | 6 | return false; |
63 | |
} |
64 | |
|
65 | |
@Override |
66 | |
public String getViewDefinition(String schemaName, String viewName) throws DatabaseException { |
67 | 0 | return null; |
68 | |
} |
69 | |
} |