All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.chengyuxing.sql.plugins.SqlInterceptor Maven / Gradle / Ivy

Go to download

Light wrapper of JDBC, support ddl, dml, query, plsql/procedure/function, transaction and manage sql file.

There is a newer version: 9.0.2
Show newest version
package com.github.chengyuxing.sql.plugins;

import com.github.chengyuxing.sql.exceptions.IllegalSqlException;
import org.jetbrains.annotations.NotNull;

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(@NotNull String sql, @NotNull Map args, @NotNull DatabaseMetaData metaData) throws IllegalSqlException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy