public class PostgreSQLDialect extends SQLDialect
Dialect.MigrationDatacache, connectiondataManager| Constructor and Description |
|---|
PostgreSQLDialect(@NotNull DataManager dataManager)
Creates a new PostgreSQL dialect
|
| Modifier and Type | Method and Description |
|---|---|
@NotNull java.sql.PreparedStatement |
createKeyImpl(@NotNull java.lang.String table,
@NotNull java.lang.String key)
Create a key in the given table
|
@NotNull java.sql.PreparedStatement |
createTableImpl(@NotNull java.lang.String table)
Create a table in the database
|
protected @NotNull java.sql.PreparedStatement |
getAllValuesFromDatabaseImpl(@NotNull java.lang.String table)
Get all values from the database
|
@NotNull java.util.Optional<java.lang.String> |
getFromDatabaseImpl(@NotNull java.lang.String table,
@NotNull java.lang.String target,
@NotNull java.lang.String column)
Get a value from the database
|
@NotNull java.sql.PreparedStatement |
getTablesImpl()
Get all tables from the database
|
boolean |
removeFromDatabaseImpl(@NotNull java.lang.String table,
@NotNull java.lang.String target,
@NotNull java.lang.String column)
Remove a value from the database
|
@NotNull java.util.Set<FailedSet> |
setToDatabaseImpl(@NotNull java.lang.String table,
@NotNull java.lang.String target,
@NotNull java.util.concurrent.ConcurrentHashMap<java.lang.String,Value> data)
Set multiple values to the database
|
@Nullable FailedSet |
setToDatabaseImpl(@NotNull java.lang.String table,
@NotNull java.lang.String target,
@NotNull java.lang.String column,
@NotNull java.lang.String value)
Set a value to the database
|
createKey, createTable, createTablesKeys, getAllValuesFromDatabase, getFromCacheImpl, getMigrationDataFromDatabaseImpl, getTables, markRemovedInCacheImpl, saveCacheImpl, saveCacheImpl, setToCacheImpl, setValuesParametersgetFromCache, getFromDatabase, getMigrationDataFromDatabase, markRemovedInCache, removeValueFromDatabase, saveCache, saveCache, setToCache, setToDatabase, setToDatabase, setToDatabasepublic PostgreSQLDialect(@NotNull
@NotNull DataManager dataManager)
throws ConnectionException
dataManager - Dialect.dataManagerConnectionException - if a database connection error occurs@NotNull
public @NotNull java.sql.PreparedStatement getTablesImpl()
throws java.sql.SQLException
SQLDialectgetTablesImpl in class SQLDialectPreparedStatement with the set parametersjava.sql.SQLException - if a database error occurs@NotNull
public @NotNull java.sql.PreparedStatement createTableImpl(@NotNull
@NotNull java.lang.String table)
throws java.sql.SQLException
SQLDialectcreateTableImpl in class SQLDialecttable - the table to createPreparedStatement with the set parametersjava.sql.SQLException - if a database error occurs@NotNull
public @NotNull java.sql.PreparedStatement createKeyImpl(@NotNull
@NotNull java.lang.String table,
@NotNull
@NotNull java.lang.String key)
throws java.sql.SQLException
SQLDialectcreateKeyImpl in class SQLDialecttable - the table to create the key inkey - the key to createPreparedStatement with the set parametersjava.sql.SQLException - if a database error occurs@NotNull
protected @NotNull java.sql.PreparedStatement getAllValuesFromDatabaseImpl(@NotNull
@NotNull java.lang.String table)
throws java.sql.SQLException
SQLDialectgetAllValuesFromDatabaseImpl in class SQLDialecttable - the table to get the values fromPreparedStatement with the set parametersjava.sql.SQLException - if a database error occurs@NotNull
public @NotNull java.util.Optional<java.lang.String> getFromDatabaseImpl(@NotNull
@NotNull java.lang.String table,
@NotNull
@NotNull java.lang.String target,
@NotNull
@NotNull java.lang.String column)
DialectgetFromDatabaseImpl in class Dialecttable - the table to get fromtarget - the target to get fromcolumn - the key to get@Nullable public @Nullable FailedSet setToDatabaseImpl(@NotNull @NotNull java.lang.String table, @NotNull @NotNull java.lang.String target, @NotNull @NotNull java.lang.String column, @NotNull @NotNull java.lang.String value)
DialectsetToDatabaseImpl in class Dialecttable - the table to set totarget - the target to set tocolumn - the key to setvalue - the value to set@NotNull public @NotNull java.util.Set<FailedSet> setToDatabaseImpl(@NotNull @NotNull java.lang.String table, @NotNull @NotNull java.lang.String target, @NotNull @NotNull java.util.concurrent.ConcurrentHashMap<java.lang.String,Value> data)
DialectsetToDatabaseImpl in class Dialecttable - the table to set totarget - the target to set todata - the data to setFailedSetspublic boolean removeFromDatabaseImpl(@NotNull
@NotNull java.lang.String table,
@NotNull
@NotNull java.lang.String target,
@NotNull
@NotNull java.lang.String column)
DialectremoveFromDatabaseImpl in class Dialecttable - the table to remove fromtarget - the target to remove fromcolumn - the key to remove