<commit_before><?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="cl.pkto.mapper.AuthorityMapper">

    <resultMap id="AuthorityResultMap" type="Authority">
        <result column="id" property="id" />
        <result column="name" property="name" />
    </resultMap>

    <select id="getAllAuthority" resultMap="AuthorityResultMap">
        select
          id
          ,name
        from authoritys
    </select>

    <select id="getAuthorityById" resultMap="AuthorityResultMap" parameterType="java.lang.Long">
        select
          id
          ,name
        from authoritys
        where id = #{id}
    </select>

    <insert id="saveAuthority" parameterType="Authority" useGeneratedKeys="true" keyProperty="id">
        insert into authoritys(
          name
        ) values(
          #{name}
        )
    </insert>

    <update id="updateAuthority" parameterType="Authority">
        update authoritys
        <trim prefix="set">
            <if test="name != null">
                name = #{name}
            </if>
        </trim>
        where id = #{id}
    </update>

    <delete id="deleteAuthority" parameterType="java.lang.Long">
        delete from authoritys
        where id = #{id}
    </delete>

    <select id="findAuthoritysByUserId" resultMap="AuthorityResultMap" parameterType="java.lang.Long">
        select
          a.id
          ,a.name
        from authoritys a
        inner join users_authoritys ua on a.userId = ua.id
        where a.userId = #{id}
    </select>
</mapper><commit_msg>[fix] se corrige mapper de authority<commit_after><?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="cl.pkto.mapper.AuthorityMapper">

    <resultMap id="AuthorityResultMap" type="Authority">
        <result column="id" property="id" />
        <result column="name" property="name" />
    </resultMap>

    <select id="getAllAuthority" resultMap="AuthorityResultMap">
        select
          id
          ,name
        from authoritys
    </select>

    <select id="getAuthorityById" resultMap="AuthorityResultMap" parameterType="java.lang.Long">
        select
          id
          ,name
        from authoritys
        where id = #{id}
    </select>

    <insert id="saveAuthority" parameterType="Authority" useGeneratedKeys="true" keyProperty="id">
        insert into authoritys(
          name
        ) values(
          #{name}
        )
    </insert>

    <update id="updateAuthority" parameterType="Authority">
        update authoritys
        <trim prefix="set">
            <if test="name != null">
                name = #{name}
            </if>
        </trim>
        where id = #{id}
    </update>

    <delete id="deleteAuthority" parameterType="java.lang.Long">
        delete from authoritys
        where id = #{id}
    </delete>

    <select id="findAuthoritysByUserId" resultMap="AuthorityResultMap" parameterType="java.lang.Long">
        select
          a.id
          ,a.name
        from authoritys a
        inner join users_authoritys ua on ua.authorityId = a.id
        where ua.userId = #{id}
    </select>
</mapper>
{'fraction_non_alphanumeric': 0.13117699910152741, 'fraction_numerical': 0.0035938903863432167, 'mean_word_length': 2.187022900763359, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 2, '>': 51, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4330292', 'n_tokens_mistral': 1017, 'n_tokens_neox': 992, 'n_words': 216}