package cn.stylefeng.team.project.api;

import cn.stylefeng.team.project.api.pojo.SqlProviderResult;

import java.util.List;
import java.util.Map;

public interface SqlProviderApi {

    String selectSql(List<String> fieldNames, String tableName);

    String selectSql(List<String> fieldNames, String tableName, Map<String, Object> businessSearchParams);

    String selectSqlLimitCreateUser(List<String> fieldNames, String tableName, Long createUserId);

    SqlProviderResult selectById(String tableName, String primaryKeyId);

    SqlProviderResult selectByField(String tableName, String fieldCode, String primaryKeyId);

    SqlProviderResult deleteByField(String tableName, String fieldCode, List<String> fieldValue);

    SqlProviderResult insert(String tableName, Map<String, Object> tableData);

    SqlProviderResult update(String tableName, Long primaryKeyId, Map<String, Object> data);

    SqlProviderResult batchInsert(String tableName, List<Map<String, Object>> tableDataList);

}
