public enum RDBDocumentStoreDB extends Enum<RDBDocumentStoreDB>
| Modifier and Type | Class and Description |
|---|---|
static class |
RDBDocumentStoreDB.FETCHFIRSTSYNTAX |
| Enum Constant and Description |
|---|
DB2 |
DEFAULT |
DERBY |
H2 |
MSSQL |
MYSQL |
ORACLE |
POSTGRES |
| Modifier and Type | Field and Description |
|---|---|
protected String |
description |
| Modifier and Type | Method and Description |
|---|---|
String |
checkVersion(DatabaseMetaData md)
Check the database brand and version
|
protected String |
extractFields(ResultSet rs,
String indexStats) |
String |
getAdditionalDiagnostics(RDBConnectionHandler ch,
String tableName)
Returns additional DB-specific statistics, augmenting the return value of
RDBDocumentStore.getStats(). |
Map<String,String> |
getAdditionalStatistics(RDBConnectionHandler ch,
String catalog,
String tableName) |
String |
getBigintType() |
RDBJDBCTools.PreparedStatementComponent |
getConcatQuery(String appendData,
int dataOctetLimit)
Returns the CONCAT function or its equivalent function or sub-query.
|
String |
getCurrentTimeStampInSecondsSyntax()
Query syntax for current time in ms since the epoch
|
RDBDocumentStoreDB.FETCHFIRSTSYNTAX |
getFetchFirstSyntax()
Query syntax for "FETCH FIRST"
|
List<String> |
getIndexCreationStatements(String tableName,
int level) |
@NotNull String |
getInitializationStatement()
Query for any required initialization of the DB.
|
String |
getModifiedIndexStatement(String tableName) |
String |
getSmallintType() |
String |
getTableCreationStatement(String tableName,
int schema)
Table creation statement string
|
List<String> |
getTableUpgradeStatements(String tableName,
int level)
Statements needed to upgrade the DB
|
static @NotNull RDBDocumentStoreDB |
getValue(String desc) |
String |
makeIndexConditionalForColumn(String columnName) |
String |
toString() |
static RDBDocumentStoreDB |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static RDBDocumentStoreDB[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RDBDocumentStoreDB DEFAULT
public static final RDBDocumentStoreDB H2
public static final RDBDocumentStoreDB DERBY
public static final RDBDocumentStoreDB POSTGRES
public static final RDBDocumentStoreDB DB2
public static final RDBDocumentStoreDB ORACLE
public static final RDBDocumentStoreDB MYSQL
public static final RDBDocumentStoreDB MSSQL
protected String description
public static RDBDocumentStoreDB[] values()
for (RDBDocumentStoreDB c : RDBDocumentStoreDB.values()) System.out.println(c);
public static RDBDocumentStoreDB valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic String checkVersion(DatabaseMetaData md) throws SQLException
SQLExceptionpublic RDBDocumentStoreDB.FETCHFIRSTSYNTAX getFetchFirstSyntax()
public String getCurrentTimeStampInSecondsSyntax()
public RDBJDBCTools.PreparedStatementComponent getConcatQuery(String appendData, int dataOctetLimit)
appendData - string to be inserteddataOctetLimit - expected capacity of data column@NotNull public @NotNull String getInitializationStatement()
public String getTableCreationStatement(String tableName, int schema)
tableName - public List<String> getIndexCreationStatements(String tableName, int level)
public String getAdditionalDiagnostics(RDBConnectionHandler ch, String tableName)
RDBDocumentStore.getStats().
Where applicable, the following fields are returned similar to the output for MongoDB:
Additionally, a information obtained from the databases system tables/views can be included:
These fields will just contain DB-specific name/value pairs obtained from the database. The exact fields to fetch are preconfigured by can be tuned using system properties, such as:
-Dorg.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.DB2.TABLE_STATS="card npages mpages fpages overflow pctfree avgrowsize stats_time" -Dorg.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.DB2.INDEX_STATS="indextype colnames pctfree clusterratio nleaf nlevels fullkeycard density indcard numrids numrids_deleted avgleafkeysize avgnleafkeysize remarks stats_time"
(this currently applies to DB types: DB2, ORACLE, and
MYSQL).
See links below for the definition of the individual fields:
POSTGRES - PostgreSQL
9.6.6 Documentation - 9.26.7. Database Object Management Functions
DB2 - DB2 10.5 for Linux, UNIX, and Windows: SYSCAT.TABLES
catalog view, SYSCAT.INDEXES
catalog view
ORACLE - Oracle Database Online Documentation 12c Release 1
(12.1): 3.118
ALL_TABLES, 2.127
ALL_INDEXES
MYSQL - MySQL 5.7 Reference Manual: 13.7.5.36
SHOW TABLE STATUS Syntax, 13.7.5.22 SHOW
INDEX Syntax
MSSQL - Developer Reference for SQL Server: sys.dm_db_partition_stats
(Transact-SQL), sp_spaceused
(Transact-SQL)
DERBY - Derby Reference Manual: SYSCS_DIAG.SPACE_TABLE diagnostic table function
public Map<String,String> getAdditionalStatistics(RDBConnectionHandler ch, String catalog, String tableName)
public String getSmallintType()
public String getBigintType()
public List<String> getTableUpgradeStatements(String tableName, int level)
protected String extractFields(ResultSet rs, String indexStats) throws SQLException
SQLExceptionpublic String toString()
toString in class Enum<RDBDocumentStoreDB>@NotNull public static @NotNull RDBDocumentStoreDB getValue(String desc)
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.