package com.hzya.frame.execsql.service;

import com.hzya.frame.execsql.entity.ExecSqlEntity;

import java.util.HashMap;
import java.util.List;

/**
 * @Description 描述
 * @Author xiang2lin
 * @Date 2021/4/28 14:26
 **/
public interface IExecSqlService {


    /**
     * 执行select语句
     * @param entity
     * @return
     * @throws Exception
     */
    List<HashMap<String,Object>> execSelectSql(ExecSqlEntity entity)throws RuntimeException;

    /**
     * 执行update语句
     * @param sql
     * @param data_source_code
     * @return
     * @throws Exception
     */
    int execUpdateSql(String sql,String data_source_code)throws Exception;


    /**
     * 执行insert语句
     * @param sql
     * @param data_source_code
     * @return
     * @throws Exception
     */
    int execInsertSql(String sql,String data_source_code)throws Exception;

    /**
     * 执行select语句
     * @param sql   要执行的sql语句
     * @param data_source_code  数据源编号
     * @return
     * @throws Exception
     */
    List<HashMap<String,Object>> execSelectSql(String sql,String data_source_code)throws Exception;


}
