Annotation Interface SelectKey


The annotation that specify an SQL for retrieving a key value.

How to use:

 public interface UserMapper {
   @SelectKey(statement = "SELECT identity('users')", keyProperty = "id", before = true, resultType = int.class)
   @Insert("INSERT INTO users (id, name) VALUES(#{id}, #{name})")
   boolean insert(User user);
 }
 
Author:
Clinton Begin