Indicates a stored function call.
The annotated method must be a member of a Dao annotated interface.
@Dao
public interface EmployeeDao {
@Function
BigDecimal getSalary(@In Integer id, @Out Reference<String> name);
}
The method may throw following exceptions:
DomaNullPointerExceptionif any of the method parameters arenullUnknownColumnExceptionifResultSetis used and a column is not found in the result setJdbcExceptionif a JDBC related error occurs
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanWhether to ensure that all entity properties are mapped to columns of a result set.The naming convention for keys ofMap<Object, String>.The stored function name.intThe query timeout in seconds.boolean
-
Element Details
-
catalog
String catalog- Returns:
- the catalog name for the stored function.
- Default:
- ""
-
schema
String schema- Returns:
- the schema name for the stored function.
- Default:
- ""
-
name
String nameThe stored function name.If not specified, the annotated method name is used.
- Returns:
- the stored function name
- Default:
- ""
-
quote
boolean quote- Returns:
- whether quotation marks should be used for the catalog name, the schema name and the stored function name in SQL statements.
- Default:
- false
-
queryTimeout
int queryTimeoutThe query timeout in seconds.If not specified,
Config.getQueryTimeout()is used.- Returns:
- the query timeout
- See Also:
- Default:
- -1
-
mapKeyNaming
MapKeyNamingType mapKeyNamingThe naming convention for keys ofMap<Object, String>.This value is used only if a result set is fetched as
Map<Object, String>orList<Map<Object, String>>.- Returns:
- the naming convention to be used for map keys when fetching results
- Default:
- NONE
-
ensureResultMapping
boolean ensureResultMappingWhether to ensure that all entity properties are mapped to columns of a result set.This value is used only if the result set is fetched as an entity or a entity list.
If
trueand there are some unmapped properties、ResultMappingExceptionis thrown from the annotated method.- Returns:
- whether to ensure that all entity properties are mapped to columns of a result set
- Default:
- false
-
sqlLog
SqlLogType sqlLog- Returns:
- the output format to be used for SQL logs when this function is executed.
- Default:
- FORMATTED
-