|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.openrdf.sesame.sailimpl.rdbms.RDBMS
A representation of an RDBMS. This class defines DBMS-specific constants and methods that are needed by the Sail classes in this package. Subclasses of this class will override specific values and methods if this is needed for that specific database.
| Field Summary | |
String |
BOOLEAN
Datatype of boolean. |
int |
BOOLEAN_TYPE
|
String |
FALSE
Boolean value 'false'. |
String |
ID_INT
Datatype for IDs (integer). |
int |
ID_INT_TYPE
|
String |
INFOFIELD
Datatype of fields (both key and value) in the repository info table (unicode strings of max 255 characters). |
int |
INFOFIELD_TYPE
|
String |
LABEL
Datatype of label of literal (arbitrary length unicode string). |
String |
LABEL_HASH
Datatype of labelHash of literal (a signed 64-bit long). |
int |
LABEL_HASH_TYPE
|
int |
LABEL_TYPE
|
String |
LANGUAGE
Datatype of language of literal. |
int |
LANGUAGE_TYPE
|
String |
LOCALNAME
Datatype of localname of resource. |
int |
LOCALNAME_TYPE
|
int |
MAX_PREFIX_LENGTH
|
String |
NAME
Datatype of name of namespace. |
int |
NAME_TYPE
|
String |
PREFIX
Datatype of prefix of namespace. |
int |
PREFIX_TYPE
|
String |
TRUE
Boolean value 'true'. |
| Constructor Summary | |
RDBMS()
Creates a nw RDBMS. |
|
| Method Summary | |
void |
clearTable(String tableName)
Clears a table. |
String |
convertBoolean(boolean b)
Converts a boolean value to a string representation that can be used in a query for this RDBMS. |
int |
copyDistinctRows(String sourceTable,
String targetTable)
Copies distinct rows from one table to another (duplicates are suppressed). |
int |
copyRows(String sourceTable,
String targetTable)
Copies rows from one table to another. |
void |
createIndex(String table,
String column)
Creates an index on the specific column in the specific table. |
void |
createIndex(String table,
String[] columns,
boolean unique)
Creates an index on the specified columns in the specified table. |
static RDBMS |
createInstance(String jdbcUrl,
String user,
String passwd)
|
void |
createUniqueIndex(String table,
String column)
Creates a unique index on the specified column in the specified table. |
void |
disconnect()
Closes any open connections to the RDBMS. |
void |
dropIndex(String table,
String column)
Drops the index on the specified column name from the specified table. |
void |
dropIndex(String table,
String[] columns)
Drops the index on the specified columns from the specified table. |
void |
dropTable(String tableName)
Drops a table. |
boolean |
emptyStringIsNull()
Should return true if the database converts empty string to NULL. |
String |
escapeString(String s)
Escapes any special characters in the specifed string such that it can be used in a query for this RDBMS. |
int |
executeUpdate(String query)
Executes an update query. |
Connection |
getConnection()
Gets a connection to the RDBMS. |
String |
getIndexName(String table,
String column)
Creates an index name based on the name of the column and table that it's supposed to index. |
String |
getIndexName(String table,
String[] columns)
Creates an index name based on the name of the columns and table that it's supposed to index. |
String |
getPatternMatchExpr(String pattern,
boolean caseSensitive)
|
String |
getPatternMatchOperator(boolean caseSensitive)
|
String |
getSearchStringEscape()
Returns the character string that can be used to escape special characters in string patterns. |
void |
optimizeTable(String tableName)
Optimizes a table. |
void |
optimizeTable(String tableName,
int modifiedRowsCount)
Optimizes a table. |
boolean |
queryHasResults(String query)
Evaluates the specific query and check whether it has any results. |
void |
renameTable(String currentTableName,
String newTableName)
Renames a table. |
void |
renameTableColumn(String tableName,
String currentColumnName,
String newColumnName,
String columnSignature)
|
void |
setConnectionInfo(String jdbcUrl,
String user,
String password)
Sets the information that is required for connecting to the RDBMS. |
boolean |
supportsLikeEscapeClause()
Indicates whether the database supports LIKE "..." |
boolean |
supportsPatternMatches(boolean caseSensitive)
|
boolean |
tableExists(String tableName)
Checks whether a table with the specified name exists. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public String ID_INT
public int ID_INT_TYPE
public String LOCALNAME
public int LOCALNAME_TYPE
public String LANGUAGE
public int LANGUAGE_TYPE
public String LABEL
public int LABEL_TYPE
public String LABEL_HASH
public int LABEL_HASH_TYPE
public String PREFIX
public int PREFIX_TYPE
public int MAX_PREFIX_LENGTH
public String NAME
public int NAME_TYPE
public String BOOLEAN
public int BOOLEAN_TYPE
public String TRUE
public String FALSE
public String INFOFIELD
public int INFOFIELD_TYPE
| Constructor Detail |
public RDBMS()
| Method Detail |
public static RDBMS createInstance(String jdbcUrl,
String user,
String passwd)
throws SQLException
SQLException
public void setConnectionInfo(String jdbcUrl,
String user,
String password)
throws SQLException
SQLExceptionpublic void disconnect()
public Connection getConnection()
throws SQLException
SQLException
public int executeUpdate(String query)
throws SQLException
SQLException
public boolean queryHasResults(String query)
throws SQLException
SQLException
public void createIndex(String table,
String column)
throws SQLException
table - The table name.column - The column name.
SQLException
public void createUniqueIndex(String table,
String column)
throws SQLException
table - The table name.column - The column name.
SQLException
public void createIndex(String table,
String[] columns,
boolean unique)
throws SQLException
table - The table name.columns - The column namesunique - Flag indicating whether the index should be a unique index.
SQLException
public void dropIndex(String table,
String column)
throws SQLException
table - The table name.column - The column name.
SQLException
public void dropIndex(String table,
String[] columns)
throws SQLException
table - The table name.columns - The column names.
SQLException
public String getIndexName(String table,
String column)
public String getIndexName(String table,
String[] columns)
public boolean tableExists(String tableName)
throws SQLException
SQLException
public void optimizeTable(String tableName,
int modifiedRowsCount)
throws SQLException
SQLException
public void optimizeTable(String tableName)
throws SQLException
SQLException
public final void clearTable(String tableName)
throws SQLException
SQLException
public final void dropTable(String tableName)
throws SQLException
SQLException
public final void renameTable(String currentTableName,
String newTableName)
throws SQLException
SQLException
public void renameTableColumn(String tableName,
String currentColumnName,
String newColumnName,
String columnSignature)
throws SQLException
SQLException
public int copyRows(String sourceTable,
String targetTable)
throws SQLException
SQLException
public int copyDistinctRows(String sourceTable,
String targetTable)
throws SQLException
SQLExceptionpublic String convertBoolean(boolean b)
public String escapeString(String s)
public boolean emptyStringIsNull()
public boolean supportsPatternMatches(boolean caseSensitive)
public String getPatternMatchOperator(boolean caseSensitive)
public String getPatternMatchExpr(String pattern,
boolean caseSensitive)
public boolean supportsLikeEscapeClause()
public String getSearchStringEscape()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||