com.github.chengyuxing.sql.plugins.QueryTimeoutHandler 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.plugins;
import org.jetbrains.annotations.Range;
import java.sql.Statement;
import java.util.Map;
/**
* Jdbc execute sql timeout({@link Statement#setQueryTimeout(int)}) handler.
*/
@FunctionalInterface
public interface QueryTimeoutHandler {
/**
* Do handle sql execute timeout.
*
* @param sql sql
* @param args args
* @return timeout (seconds)
*/
@Range(from = 0, to = Integer.MAX_VALUE)
int handle(String sql, Map args);
}