com.codingapi.springboot.permission.event.JdbcPreparedStatementExecuteEvent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of springboot-starter-data-permission Show documentation
Show all versions of springboot-starter-data-permission Show documentation
springboot-starter-data-permission project for Spring Boot
package com.codingapi.springboot.permission.event;
import com.codingapi.springboot.permission.analyzer.JdbcSql;
import com.codingapi.springboot.framework.event.IEvent;
import lombok.AllArgsConstructor;
import java.sql.PreparedStatement;
import java.sql.SQLException;
/**
* @author lorne
* @since 1.0.0
*/
@AllArgsConstructor
public class JdbcPreparedStatementExecuteEvent implements IEvent {
private final PreparedStatement preparedStatement;
private final JdbcSql jdbcSql;
public void put(String key,Object value) throws SQLException {
jdbcSql.put(key,value,(index)->{
preparedStatement.setObject(index,value);
});
}
}