package xtools.boot.db.mybatis.mapper;

import com.alibaba.fastjson2.JSONObject;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>Title : MonitorDatabasesMapper</p>
 * <p>Description : MonitorDatabasesMapper</p>
 * <p>DevelopTools : Idea_x64_v2026.1</p>
 * <p>DevelopSystem : macOS Sequoia 15.7.5</p>
 * <p>Company : org.xujun</p>
 *
 * @author : XuJun
 * @version : 5.0.0
 * @date : 2026/2/14 11:49
 */
@Mapper
public interface MonitorDatabasesMapper {

    /**
     * 监控MySQL
     *
     * @param sql SQL语句
     * @return 监控数据
     */
    @Select({
            "<script>",
            "${sql}",
            "</script>"
    })
    List<JSONObject> mysql(@Param("sql") String sql);

}
