Package io.vertigo.database.sql.vendor
Interface SqlDialect
-
public interface SqlDialect
The database dialect. Provides all the vendor's specific SQL- Author:
- mlaroche
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
SqlDialect.GenerationMode
how keys are generated
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
appendListState(StringBuilder query, Integer maxRows, int skipRows, String sortFieldName, boolean sortDesc)
Ajoute à la requete les éléments techniques nécessaire pour paginer le resultat {maxRows}, {skipRows}, {sortFieldName} {sortDesc}.String
createInsertQuery(String idFieldName, List<String> dataFieldsName, String sequencePrefix, String tableName)
Creates the insert request.default String
createSelectForUpdateQuery(String tableName, String requestedFields, String idFieldName)
Requête à exécuter pour faire un select for update.default String
getConcatOperator()
SqlDialect.GenerationMode
getGenerationMode()
default String
getTestQuery()
Statement to execute to verify the database connection
-
-
-
Method Detail
-
getConcatOperator
default String getConcatOperator()
- Returns:
- The operator for string concatenation.
-
createInsertQuery
String createInsertQuery(String idFieldName, List<String> dataFieldsName, String sequencePrefix, String tableName)
Creates the insert request.- Parameters:
idFieldName
- the id field's namedataFieldsName
- data fieldssequencePrefix
- the prefix to use for sequencetableName
- the name of the table in which we want to insert- Returns:
- the sql request
-
appendListState
default void appendListState(StringBuilder query, Integer maxRows, int skipRows, String sortFieldName, boolean sortDesc)
Ajoute à la requete les éléments techniques nécessaire pour paginer le resultat {maxRows}, {skipRows}, {sortFieldName} {sortDesc}.- Parameters:
query
- the sql querymaxRows
- max rows (null if none)skipRows
- skip rowssortFieldName
- sort FieldName (null if none)sortDesc
- if sorting desc
-
createSelectForUpdateQuery
default String createSelectForUpdateQuery(String tableName, String requestedFields, String idFieldName)
Requête à exécuter pour faire un select for update. Doit pouvoir être surchargé pour tenir compte des spécificités de la base de données utilisée..- Parameters:
tableName
- nom de la tablerequestedFields
- the list of fields to retrieve (the select clause)idFieldName
- nom de la clé primaire- Returns:
- select à exécuter.
-
getTestQuery
default String getTestQuery()
Statement to execute to verify the database connection- Returns:
- statement to execute
-
getGenerationMode
SqlDialect.GenerationMode getGenerationMode()
- Returns:
- how keys are generated
-
-