public class SQLiteDialect extends SQLDialect
Dialect.MigrationDatacache, connectiondataManager| Constructor and Description |
|---|
SQLiteDialect(@NotNull DataManager dataManager)
Creates a new SQLite dialect
|
| Modifier and Type | Method and Description |
|---|---|
@Nullable 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
|
boolean |
removeFromDatabaseImpl(@NotNull java.lang.String table,
@NotNull java.lang.String target,
@NotNull java.lang.String column)
Remove a value from the database
|
boolean |
setToDatabaseImpl(@NotNull java.lang.String table,
@NotNull java.lang.String target,
@NotNull java.util.Map<java.lang.String,java.lang.String> data)
Set multiple values to the database
|
boolean |
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, removeFromCacheImpl, saveCacheImpl, saveCacheImpl, setToCacheImpl, setValuesParametersgetFromCache, getFromDatabase, getMigrationDataFromDatabase, removeFromCache, removeValueFromDatabase, saveCache, saveCache, setToCache, setToDatabase, setToDatabase, setToDatabasepublic SQLiteDialect(@NotNull
@NotNull DataManager dataManager)
throws ConnectionException
dataManager - Dialect.dataManagerConnectionException - if a database connection 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@Nullable
public @Nullable 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 getpublic boolean 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 setpublic boolean setToDatabaseImpl(@NotNull
@NotNull java.lang.String table,
@NotNull
@NotNull java.lang.String target,
@NotNull
@NotNull java.util.Map<java.lang.String,java.lang.String> data)
DialectsetToDatabaseImpl in class Dialecttable - the table to set totarget - the target to set todata - the data to setpublic 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