Annotation Type Select


  • @Documented
    @Retention(RUNTIME)
    @Target(METHOD)
    public @interface Select
    The annotation that specify an SQL for retrieving record(s).


    How to use:

     public interface UserMapper {
       @Select("SELECT id, name FROM users WHERE id = #{id}")
       User selectById(int id);
     }
     
    Author:
    Clinton Begin
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.String[] value
      Returns an SQL for retrieving record(s).
    • Element Detail

      • value

        java.lang.String[] value
        Returns an SQL for retrieving record(s).
        Returns:
        an SQL for retrieving record(s)