<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="com.tencent.supersonic.headless.server.persistence.mapper.StatMapper">

    <resultMap id="QueryStatDO"
               type="com.tencent.supersonic.headless.api.pojo.QueryStat">
        <id column="id" property="id"/>
        <result column="trace_id" property="traceId"/>
        <result column="model_id" property="modelId"/>
        <result column="data_set_id" property="dataSetId"/>
        <result column="query_user" property="queryUser"/>
        <result column="created_at" property="createdAt"/>
        <result column="query_type" property="queryType"/>
        <result column="query_type_back" property="queryTypeBack"/>
        <result column="query_sql_cmd" property="querySqlCmd"/>
        <result column="sql_cmd_md5" property="querySqlCmdMd5"/>
        <result column="query_struct_cmd" property="queryStructCmd"/>
        <result column="struct_cmd_md5" property="queryStructCmdMd5"/>
        <result column="query_sql" property="querySql"/>
        <result column="sql_md5" property="sqlMd5"/>
        <result column="query_engine" property="queryEngine"/>
        <result column="elapsed_ms" property="elapsedMs"/>
        <result column="query_state" property="queryState"/>
        <result column="native_query" property="nativeQuery"/>
        <result column="start_date" property="startDate"/>
        <result column="end_date" property="endDate"/>
        <result column="dimensions" property="dimensions"/>
        <result column="metrics" property="metrics"/>
        <result column="select_cols" property="selectCols"/>
        <result column="agg_cols" property="aggCols"/>
        <result column="filter_cols" property="filterCols"/>
        <result column="group_by_cols" property="groupByCols"/>
        <result column="order_by_cols" property="orderByCols"/>
        <result column="use_result_cache" property="useResultCache"/>
        <result column="use_sql_cache" property="useSqlCache"/>
        <result column="sql_cache_key" property="sqlCacheKey"/>
        <result column="result_cache_key" property="resultCacheKey"/>
        <result column="query_opt_mode" property="queryOptMode"/>
    </resultMap>

</mapper>
