package com.nantian.cloud.query.service.record.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nantian.cloud.query.entity.jljc.MultiDimensionDataSource;
import com.nantian.cloud.query.mapper.record.RecordMultiDimensionDataSourceMapper;
import com.nantian.cloud.query.service.record.RecordMultiDimensionDataSourceService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 多维度查询数据源管理服务接口实现
 *
 * @author kancy
 * @since 2022-02-15 16:12:46
 * @description 由 Mybatisplus Code Generator 创建
 */
@Slf4j
@RequiredArgsConstructor
@Service
public class RecordMultiDimensionDataSourceServiceImpl extends ServiceImpl<RecordMultiDimensionDataSourceMapper, MultiDimensionDataSource> implements RecordMultiDimensionDataSourceService {
    private final RecordMultiDimensionDataSourceMapper multiDimensionDataSourceMapper;

    @Override
    public List<String> queryTablesByDataSource(String dataBaseName) {
        return baseMapper.queryAllTables(dataBaseName);
    }

    @Override
    public List<String> queryColumnsByDataSourceAndTable(String dataBaseName, String tableName) {
        return baseMapper.queryAllColumns(dataBaseName,tableName);
    }
}
