public interface DatabaseConfiguration
Modifier and Type | Method and Description |
---|---|
String |
getConnectionProviderClassName()
Determine the class name of the connection provider to use.
|
org.hibernate.dialect.function.SQLFunction |
getDatepartSQLFunction()
Get the SQLFunction that will translate the HQL 'datepart' function to SQL.
|
String |
getFulltextParameterValue(String pattern,
org.hibernate.criterion.MatchMode matchMode)
Get the (database specific) parameter value for the given pattern
|
String |
getFulltextParameterValue(String pattern,
org.hibernate.criterion.MatchMode matchMode,
boolean doNotUseFulltext)
Get the (database specific) parameter value for the given pattern
|
org.hibernate.dialect.function.SQLFunction |
getFulltextSQLFunction()
Return the SQL function that translates the HQL 'fulltext' function to SQL.
|
boolean |
isExtendSubselectsWithOuterConditions()
Determine if subselects should be extended by using conditions of the outer clause.
|
boolean |
isUseFulltextFeature() |
String getConnectionProviderClassName()
org.hibernate.dialect.function.SQLFunction getDatepartSQLFunction()
Usage: day_of_date(dateField, alias)
where dateField must be one of the
DateField
constants
Example in HQL to return the year of the publication date of a note:
"date_part(" + DateField.YEAR + ", note.publication_date)"
String getFulltextParameterValue(String pattern, org.hibernate.criterion.MatchMode matchMode)
pattern
- the patternmatchMode
- the hibernate match modeString getFulltextParameterValue(String pattern, org.hibernate.criterion.MatchMode matchMode, boolean doNotUseFulltext)
pattern
- the patternmatchMode
- the hibernate match modedoNotUseFulltext
- true if the parameter should use the like wildcards matching even if fulltext is
enabledorg.hibernate.dialect.function.SQLFunction getFulltextSQLFunction()
The HQL 'fulltext' function takes two arguments: The field to be search and the string to
search for. In HQL the fulltext function has always to be matched against 1, e.g.
fulltext(content.content, 'mysearch') = 1
. BUT if you want the negation use:
not (fulltext(content.content,'mysearch'))
When building queries with the HQL fulltext function always use the
getFulltextParameterValue(String, MatchMode)
to set the parameter values because the
syntax differs per database
boolean isExtendSubselectsWithOuterConditions()
See the MSSQL Implementation for an example.
boolean isUseFulltextFeature()
Copyright © 2019 Communote team. All rights reserved.