public abstract class KiWiDialect extends Object
Modifier and Type | Field and Description |
---|---|
static int |
VERSION |
Modifier | Constructor and Description |
---|---|
protected |
KiWiDialect() |
Modifier and Type | Method and Description |
---|---|
String |
getCreateScript(String scriptName)
Return the contents of the SQL create script used for initialising an empty database
|
abstract String |
getDateTimeTZ(String alias)
Return the SQL timezone value for a KiWiDateLiteral, corrected by the timezone offset.
|
abstract String |
getDriverClass()
Return the name of the driver class (used for properly initialising JDBC connections)
|
String |
getDropScript(String scriptName)
Return the contents of the SQL drop script used for cleaning up all traces of the KiWi triple store
|
abstract String |
getGroupConcat(String value,
String separator,
boolean distinct)
Return the name of the aggregate function for group concatenation (string_agg in postgres, GROUP_CONCAT in MySQL)
|
abstract String |
getILike(String text,
String pattern)
Return the database specific case insensitive like comparison, e.g.
|
String |
getMigrationScript(int oldVersion,
String name)
Return the contents of the SQL scripts used for migrating from the version given as argument to the
current version.
|
abstract String |
getRegexp(String text,
String pattern,
String flags)
Return the database specific operator for matching a text against a regular expression.
|
protected String |
getScript(String scriptName)
Return the contents of the SQL script with the given file name (relative to the current class)
|
String |
getStatement(String identifier)
Return the SQL statement with the given identifier, or null if such a statement does not exist.
|
Set<String> |
getStatementIdentifiers()
Return all available statement identifiers.
|
abstract String |
getValidationQuery()
Get the query string that can be used for validating that a JDBC connection to this database is still valid.
|
int |
getVersion() |
boolean |
hasStatement(String identifier)
Return true if a statement with the given identifier exists
|
boolean |
isArraySupported()
Return true in case the database supports creating arrays with ARRAY[...]
|
abstract boolean |
isBatchSupported()
Return true if batched commits are supported by this dialect.
|
boolean |
isCursorSupported()
Return true in case the database system supports using cursors for queries over large data tables.
|
abstract boolean |
isRegexpSupported(String flags)
Return true in case the SPARQL RE flags contained in the given string are supported.
|
public static final int VERSION
protected KiWiDialect() throws DriverNotFoundException
DriverNotFoundException
public int getVersion()
public abstract String getDriverClass()
public abstract boolean isBatchSupported()
public boolean isArraySupported()
public String getCreateScript(String scriptName)
public String getDropScript(String scriptName)
protected String getScript(String scriptName)
public String getMigrationScript(int oldVersion, String name)
oldVersion
- the version to migrate the database fromname
- name of the script to create; the method will look for scripts with name upgrade_name_oldv_newv.sqlpublic String getStatement(String identifier)
identifier
- property key of the statement in statements.propertiespublic boolean hasStatement(String identifier)
identifier
- key of the statement to checkpublic Set<String> getStatementIdentifiers()
public abstract String getRegexp(String text, String pattern, String flags)
text
- pattern
- flags
- public abstract boolean isRegexpSupported(String flags)
flags
- public abstract String getILike(String text, String pattern)
text
- pattern
- public abstract String getGroupConcat(String value, String separator, boolean distinct)
public abstract String getDateTimeTZ(String alias)
alias
- public abstract String getValidationQuery()
public boolean isCursorSupported()
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.