0
@Insert("insert into TABLE(c1, c2, c3) " +
        "values ( #{col1}, #{col2}, #{col3})")
Boolean save(Integer x, Integer y);

The returning Boolean would be True or False, determining if everything has been inserted properly

user
  • 854
  • 2
  • 12
  • 28

1 Answers1

1

Anyway, you cannot do that. You need to use an int (or Integer) and compare it to 0.
If result == 0, then no rows have been inserted.

@Insert("insert into TABLE(c1, c2, c3) values (#{col1}, #{col2}, #{col3})")
int save(final Integer x, final Integer y);

Using MyBatis, you could have defined a custom ResultHandler<T>

LppEdd
  • 20,274
  • 11
  • 84
  • 139