com.github.chengyuxing.sql.support.SqlInterceptor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rabbit-sql Show documentation
Show all versions of rabbit-sql Show documentation
Light wrapper of JDBC, support ddl, dml, query, plsql/procedure/function, transaction and manage sql
file.
package com.github.chengyuxing.sql.support;
import com.github.chengyuxing.sql.exceptions.IllegalSqlException;
import java.sql.DatabaseMetaData;
import java.util.Map;
/**
* Sql interceptor.
*/
@FunctionalInterface
public interface SqlInterceptor {
/**
* Pre handle before sql real execute.
*
* @param sql sql
* @param args sql parameter data
* @param metaData current database metadata
* @return true if valid or false
* @throws IllegalSqlException reject execute exception
*/
boolean preHandle(String sql, Map args, DatabaseMetaData metaData) throws IllegalSqlException;
}