Annotation Interface InsertProvider


@Documented @Retention(RUNTIME) @Target(METHOD) @Repeatable(InsertProvider.List.class) public @interface InsertProvider
The annotation that specify a method that provide an SQL for inserting record(s).

How to use:

 public interface UserMapper {

   @InsertProvider(type = SqlProvider.class, method = "insert")
   void insert(User user);

   public static class SqlProvider {
     public static String insert() {
       return "INSERT INTO users (id, name) VALUES(#{id}, #{name})";
     }
   }

 }
 
Author:
Clinton Begin