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

cn.sylinx.hbatis.db.dialect.Dialect Maven / Gradle / Ivy

The newest version!
package cn.sylinx.hbatis.db.dialect;

import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;

import cn.sylinx.hbatis.db.dialect.fs.FluentSqlCreator;
import cn.sylinx.hbatis.db.dialect.sql.SqlBuilder;

public interface Dialect {

	void setParameters(PreparedStatement pst, Object... params) throws SQLException;

	void setParameters(PreparedStatement pst, List params) throws SQLException;

	 T getResult(ResultSet rs, String columnName, Class clz) throws SQLException;

	 T getResult(ResultSet rs, int columnIndex, Class clz) throws SQLException;

	 T getResult(CallableStatement cs, int columnIndex, Class clz) throws SQLException;

	/**
	 * 数据库类型
	 * 
	 * @return
	 */
	DbType getDbType();

	/**
	 * 获取sql builder
	 * 
	 * @return
	 */
	SqlBuilder getSqlBuilder();

	/**
	 * 获取FluentSqlCreator创建器
	 * 
	 * @return
	 */
	FluentSqlCreator getFluentSqlCreator();
}