Indicates a SQL template for database operations.
This annotation can be combined with following annotations:
@Dao
public interface EmployeeDao {
@Sql("select name from employee where age = /* age */0)")
@Select
List<String> selectNamesByAge(int age);
@Sql("insert into employee (name) values (/* employee.name */'test data')")
@Insert
int insert(Employee employee);
}
-
Required Element Summary
Required Elements
-
Element Details
-
value
String value- Returns:
- the SQL template
-