public abstract static class DialectSupport.Abstract extends Object implements DialectSupport
DialectSupport.AbstractARCHIVE_TABLE_PROPERTY, CATALOG_PROPERTY, DEFAULT_ARCHIVE_TABLE_NAME, DEFAULT_CATALOG_NAME, DEFAULT_POINT_COLUMN, DEFAULT_SCHEMA_NAME, DEFAULT_SNAPSHOT_TABLE_NAME, DEFAULT_STAMP_COLUMN, DEFAULT_STATE_COLUMN, DEFAULT_VALUE_COLUMN, DEFAULT_VERSION_COLUMN, POINT_COLUMN_PROPERTY, SCHEMA_PROPERTY, SNAPSHOT_TABLE_PROPERTY, STAMP_COLUMN_PROPERTY, STATE_COLUMN_PROPERTY, TABLE_PROPERTY, VALUE_COLUMN_PROPERTY, VERSION_COLUMN_PROPERTY| Modifier | Constructor and Description |
|---|---|
protected |
Abstract(String dialectName)
Constructs an instance.
|
| Modifier and Type | Method and Description |
|---|---|
Optional<String> |
getCatalogName()
Gets the catalog name.
|
protected String |
getCatalogSchemaTable()
Gets the catalog schema table name.
|
List<String> |
getCreateTableSQL()
Gets the SQL for statements that create the table.
|
protected String |
getDefaultCatalogName()
Gets the default catalog name.
|
ClassDefImpl |
getDefaultClientDriverClassDef()
Gets the default client driver class definition.
|
protected Optional<ClassDefImpl> |
getDefaultDriverClassDef()
Gets the default driver class definition.
|
protected String |
getDefaultSchemaName()
Gets the default schema name.
|
protected String |
getDefaultTableName()
Gets the default table name.
|
StringBuilder |
getDeleteSQL(boolean purge)
Gets the SQL for a DELETE statement.
|
String |
getDialectName()
Gets the dialect name.
|
StringBuilder |
getInsertSQL()
Gets the SQL for an INSERT statement.
|
protected String |
getPointColumn()
Gets the point column name.
|
String |
getSchemaName()
Gets the schema name.
|
StringBuilder |
getSelectSQL(StoreCursor cursor)
Gets the SQL for a SELECT statement.
|
protected String |
getStampColumn()
Gets the stamp column name.
|
protected String |
getStateColumn()
Gets the state column name.
|
String |
getTableName()
Gets the table name.
|
protected Logger |
getThisLogger()
Gets the logger.
|
StringBuilder |
getUpdateSQL()
Gets the SQL for an UPDATE statement.
|
protected String |
getValueColumn()
Gets the value column name.
|
protected String |
getVersionColumn()
Gets the version column name.
|
protected boolean |
isPullDisabled()
Asks if pull is disabled.
|
protected boolean |
isSnapshot()
Asks for the snapshot indicator.
|
void |
onFirstConnection(TheStoreConnection connection)
Called on the first connection.
|
Class<? extends Driver> |
registerDriver(ClassDef driverClassDef)
Registers the JDBC driver.
|
int |
setDeleteStatement(PreparedStatement statement,
byte[] point,
long startStamp,
long finishStamp)
Sets a DELETE statement.
|
int |
setInsertStatement(PreparedStatement statement,
byte[] point,
long stamp,
long version,
byte[] state,
byte[] value)
Sets an INSERT statement according to the PointValue.
|
int |
setSelectStatement(PreparedStatement statement,
StoreCursor cursor)
Sets a SELECT statement according to the Request and request type.
|
protected static void |
setSystemProperty(String key,
String value)
Sets a system property.
|
boolean |
setUp(Optional<StoreServiceAppImpl> storeAppImpl,
File storeDataDir,
String storeEntityName)
Sets up the basic informations for dialect support.
|
int |
setUpdateStatement(PreparedStatement statement,
byte[] point,
long stamp,
long version,
Optional<byte[]> state,
Optional<byte[]> value)
Sets an UPDATE statement according to the PointValue.
|
void |
tearDown()
Tears down what has been set up.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDefaultConnectionOptions, getDefaultConnectionPassword, getDefaultConnectionShared, getDefaultConnectionURL, getDefaultConnectionUserprotected Abstract(@Nonnull
String dialectName)
dialectName - The dialect name.public Optional<String> getCatalogName()
getCatalogName in interface DialectSupportpublic List<String> getCreateTableSQL()
getCreateTableSQL in interface DialectSupportpublic ClassDefImpl getDefaultClientDriverClassDef()
getDefaultClientDriverClassDef in interface DialectSupportpublic StringBuilder getDeleteSQL(boolean purge)
getDeleteSQL in interface DialectSupportpurge - True when the operation is a purge.public final String getDialectName()
getDialectName in interface DialectSupportpublic StringBuilder getInsertSQL()
getInsertSQL in interface DialectSupportpublic final String getSchemaName()
getSchemaName in interface DialectSupportpublic StringBuilder getSelectSQL(StoreCursor cursor)
getSelectSQL in interface DialectSupportcursor - The store cursor.public final String getTableName()
getTableName in interface DialectSupportpublic StringBuilder getUpdateSQL()
getUpdateSQL in interface DialectSupportpublic void onFirstConnection(TheStoreConnection connection)
onFirstConnection in interface DialectSupportconnection - The newly established connection.public final Class<? extends Driver> registerDriver(ClassDef driverClassDef)
registerDriver in interface DialectSupportdriverClassDef - The driver class definition.public int setDeleteStatement(PreparedStatement statement,
byte[] point,
long startStamp,
long finishStamp)
throws SQLException
setDeleteStatement in interface DialectSupportstatement - The Statement prepared from DialectSupport.getDeleteSQL(boolean).point - The bytes of the Point's UUID.startStamp - The raw value of the start time stamp.finishStamp - The raw value of the finish time stamp.SQLException - From java.sql.public int setInsertStatement(PreparedStatement statement,
byte[] point,
long stamp,
long version,
byte[] state,
byte[] value)
throws SQLException
setInsertStatement in interface DialectSupportstatement - The Statement prepared from DialectSupport.getInsertSQL().point - The bytes of the Point's UUID.stamp - The raw value of the Point's time stamp.version - The raw value of the version stamp.state - The value's state.value - The Point's serialized value.SQLException - From java.sql.public int setSelectStatement(PreparedStatement statement,
StoreCursor cursor)
throws SQLException
setSelectStatement in interface DialectSupportstatement - The statement prepared from DialectSupport.getInsertSQL().cursor - The store cursor for which the statement has been prepared.SQLException - From java.sql.public boolean setUp(Optional<StoreServiceAppImpl> storeAppImpl, File storeDataDir, String storeEntityName)
setUp in interface DialectSupportstoreAppImpl - The optional store application implementation.storeDataDir - The store data directory.storeEntityName - The store entity name.public int setUpdateStatement(PreparedStatement statement,
byte[] point,
long stamp,
long version,
Optional<byte[]> state,
Optional<byte[]> value)
throws SQLException
setUpdateStatement in interface DialectSupportstatement - The Statement prepared from DialectSupport.getUpdateSQL().point - The bytes of the Point's UUID.stamp - The raw value of the Point's time stamp.version - The raw value of the version stamp.state - The value's serialized state.value - The Point's serialized value.SQLException - From java.sql.public void tearDown()
tearDown in interface DialectSupportprotected static void setSystemProperty(@Nonnull
String key,
@Nonnull
String value)
key - The property key.value - The property value.@Nonnull @CheckReturnValue protected final String getCatalogSchemaTable()
protected String getDefaultCatalogName()
@Nonnull @CheckReturnValue protected Optional<ClassDefImpl> getDefaultDriverClassDef()
protected String getDefaultSchemaName()
@Nonnull @CheckReturnValue protected String getDefaultTableName()
@Nonnull @CheckReturnValue protected final String getPointColumn()
@Nonnull @CheckReturnValue protected final String getStampColumn()
@Nonnull @CheckReturnValue protected final String getStateColumn()
@Nonnull @CheckReturnValue protected final Logger getThisLogger()
@Nonnull @CheckReturnValue protected final String getValueColumn()
@Nonnull @CheckReturnValue protected final String getVersionColumn()
@CheckReturnValue protected final boolean isPullDisabled()
@CheckReturnValue protected final boolean isSnapshot()
Copyright © 2003-2019 Serge Brisson. All Rights Reserved.