public interface DialectSupport
Modifier and Type | Interface and Description |
---|---|
static class |
DialectSupport.Abstract
Abstract dialect support.
|
Modifier and Type | Field and Description |
---|---|
static String |
ARCHIVE_TABLE_PROPERTY
The name of the archive table.
|
static String |
CATALOG_PROPERTY
The name of the database catalog.
|
static String |
DEFAULT_ARCHIVE_TABLE_NAME
Default archive table name.
|
static String |
DEFAULT_CATALOG_NAME
Default catalog name.
|
static String |
DEFAULT_POINT_COLUMN
Default point column.
|
static String |
DEFAULT_SCHEMA_NAME
Default schema name.
|
static String |
DEFAULT_SNAPSHOT_TABLE_NAME
Default snapshot table name.
|
static String |
DEFAULT_STAMP_COLUMN
Default stamp column.
|
static String |
DEFAULT_STATE_COLUMN
Default state column.
|
static String |
DEFAULT_VALUE_COLUMN
Default value column.
|
static String |
DEFAULT_VERSION_COLUMN
Default version column.
|
static String |
POINT_COLUMN_PROPERTY
The name of the Point column.
|
static String |
SCHEMA_PROPERTY
The name of the database schema.
|
static String |
SNAPSHOT_TABLE_PROPERTY
The name of the snapshot table.
|
static String |
STAMP_COLUMN_PROPERTY
The name of the Stamp column.
|
static String |
STATE_COLUMN_PROPERTY
The name of the State column.
|
static String |
TABLE_PROPERTY
The name of the database table.
|
static String |
VALUE_COLUMN_PROPERTY
The name of the Value column.
|
static String |
VERSION_COLUMN_PROPERTY
The name of the Version column.
|
Modifier and Type | Method and Description |
---|---|
Optional<String> |
getCatalogName()
Gets the catalog name.
|
List<String> |
getCreateTableSQL()
Gets the SQL for statements that create the table.
|
ClassDefImpl |
getDefaultClientDriverClassDef()
Gets the default client driver class definition.
|
default String |
getDefaultConnectionOptions()
Gets the default connection options.
|
default Optional<String> |
getDefaultConnectionPassword()
Gets the default connection password.
|
default boolean |
getDefaultConnectionShared()
Gets the default connection shared indicator.
|
default String |
getDefaultConnectionURL(File storeDataDir,
String storeEntityName)
Gets the default connection URL.
|
default String |
getDefaultConnectionUser()
Gets the default connection user.
|
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.
|
String |
getSchemaName()
Gets the schema name.
|
StringBuilder |
getSelectSQL(StoreCursor cursor)
Gets the SQL for a SELECT statement.
|
String |
getTableName()
Gets the table name.
|
StringBuilder |
getUpdateSQL()
Gets the SQL for an UPDATE statement.
|
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.
|
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.
|
static final String ARCHIVE_TABLE_PROPERTY
static final String CATALOG_PROPERTY
static final String DEFAULT_ARCHIVE_TABLE_NAME
static final String DEFAULT_CATALOG_NAME
static final String DEFAULT_POINT_COLUMN
static final String DEFAULT_SCHEMA_NAME
static final String DEFAULT_SNAPSHOT_TABLE_NAME
static final String DEFAULT_STAMP_COLUMN
static final String DEFAULT_STATE_COLUMN
static final String DEFAULT_VALUE_COLUMN
static final String DEFAULT_VERSION_COLUMN
static final String POINT_COLUMN_PROPERTY
static final String SCHEMA_PROPERTY
static final String SNAPSHOT_TABLE_PROPERTY
static final String STAMP_COLUMN_PROPERTY
static final String STATE_COLUMN_PROPERTY
static final String TABLE_PROPERTY
static final String VALUE_COLUMN_PROPERTY
static final String VERSION_COLUMN_PROPERTY
@Nonnull @CheckReturnValue Optional<String> getCatalogName()
@Nonnull @CheckReturnValue List<String> getCreateTableSQL()
@Nonnull @CheckReturnValue ClassDefImpl getDefaultClientDriverClassDef()
@Nonnull @CheckReturnValue default String getDefaultConnectionOptions()
@Nonnull @CheckReturnValue default Optional<String> getDefaultConnectionPassword()
@CheckReturnValue default boolean getDefaultConnectionShared()
@Nonnull @CheckReturnValue default String getDefaultConnectionURL(@Nonnull File storeDataDir, @Nonnull String storeEntityName)
Will always fail when not overridden.
storeDataDir
- The store data directory.storeEntityName
- The store entity name.@Nonnull @CheckReturnValue default String getDefaultConnectionUser()
Will always fail when not overridden.
@Nonnull @CheckReturnValue StringBuilder getDeleteSQL(boolean purge)
purge
- True when the operation is a purge.@Nonnull @CheckReturnValue String getDialectName()
@Nonnull @CheckReturnValue StringBuilder getInsertSQL()
@Nonnull @CheckReturnValue String getSchemaName()
@Nonnull @CheckReturnValue StringBuilder getSelectSQL(StoreCursor cursor)
cursor
- The store cursor.@Nonnull @CheckReturnValue String getTableName()
@Nonnull @CheckReturnValue StringBuilder getUpdateSQL()
void onFirstConnection(@Nonnull TheStoreConnection connection)
connection
- The newly established connection.@Nullable @CheckReturnValue Class<? extends Driver> registerDriver(@Nonnull ClassDef driverClassDef)
driverClassDef
- The driver class definition.int setDeleteStatement(@Nonnull PreparedStatement statement, @Nonnull byte[] point, long startStamp, long finishStamp) throws SQLException
statement
- The Statement prepared from 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.@CheckReturnValue int setInsertStatement(@Nonnull PreparedStatement statement, @Nonnull byte[] point, long stamp, long version, @Nonnull byte[] state, @Nonnull byte[] value) throws SQLException
statement
- The Statement prepared from 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.@CheckReturnValue int setSelectStatement(@Nonnull PreparedStatement statement, @Nonnull StoreCursor cursor) throws SQLException
statement
- The statement prepared from getInsertSQL()
.cursor
- The store cursor for which the statement has been prepared.SQLException
- From java.sql.@CheckReturnValue boolean setUp(@Nonnull Optional<StoreServiceAppImpl> storeAppImpl, @Nonnull File storeDataDir, @Nonnull String storeEntityName)
storeAppImpl
- The optional store application implementation.storeDataDir
- The store data directory.storeEntityName
- The store entity name.@CheckReturnValue int setUpdateStatement(@Nonnull PreparedStatement statement, @Nonnull byte[] point, long stamp, long version, @Nonnull Optional<byte[]> state, @Nonnull Optional<byte[]> value) throws SQLException
statement
- The Statement prepared from 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.void tearDown()
Copyright © 2003-2019 Serge Brisson. All Rights Reserved.