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

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

There is a newer version: 2.0.0.RELEASE
Show 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.common.FS;
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();

	/**
	 * 创建fluent sql
	 * 
	 * @param clazz
	 * @return
	 */
	 FS createFluentSql(Class clazz);
}