Interface CommonCountMapper
public interface CommonCountMapper
This is a general purpose MyBatis mapper for count statements. Count statements are select statements that always
return a long.
This mapper can be injected as-is into a MyBatis configuration, or it can be extended with existing mappers.
- Author:
- Jeff Butler
-
Method Summary
Modifier and TypeMethodDescriptionlong
count
(SelectStatementProvider selectStatement) Execute a select statement that returns a long (typically a select(count(*)) statement).
-
Method Details
-
count
@SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement) Execute a select statement that returns a long (typically a select(count(*)) statement). This mapper assumes the statement returns a single row with a single column that cen be retrieved as a long.- Parameters:
selectStatement
- the select statement- Returns:
- the long value
-