I have a SQL statement that needs to be executed multiple times with a list, and right now I'm using @SQLBATCH to do this.
@SqlBatch("INSERT INTO table (name, id) values (:names, :id)")
public abstract void addName(
@Bind("names") List<String> names,
@Bind("id") long id);
I would like to return an int of the number of rows affected. So I looked into @SQLUpdate, but it seems like @SQLUpdate doesn't take a list as a parameter.
@SqlUpdate("INSERT INTO table (name, id) values (:names, :id)")
public abstract int addName(
@Bind("names") List<String> names,
@Bind("id") long id);
I'm getting this error: UnableToCreateStatementException: Exception while binding.
Is there any way I can return an int of the number of rows affected?