ToDoMapper.xml
関連タイピング
-
プレイ回数54英語長文187打
-
プレイ回数44英語長文294打
-
プレイ回数56英語長文105打
-
プレイ回数62英語長文815打
-
プレイ回数58英語長文254打
-
プレイ回数42英語長文168打
-
プレイ回数41英語長文492打
-
プレイ回数56英語長文398打
問題文
(<mapper namespace="com.example.webapp.repository.ToDoMapper">)
<mapper namespace="com.example.webapp.repository.ToDoMapper">
(<select id="selectAll" resultType="com.example.webapp.entity.ToDo">)
<select id="selectAll" resultType="com.example.webapp.entity.ToDo">
(SELECT id, todo, detail, created_at as createdAt, updated_at as updatedAt)
SELECT id, todo, detail, created_at as createdAt, updated_at as updatedAt
(FROM todos)
FROM todos
(</select>)
</select>
(<select id="selectById" resultType="com.example.webapp.entity.ToDo">)
<select id="selectById" resultType="com.example.webapp.entity.ToDo">
(SELECT id, todo, detail, created_at as createdAt, updated_at as updatedAt)
SELECT id, todo, detail, created_at as createdAt, updated_at as updatedAt
(FROM todos WHERE id = #{id})
FROM todos WHERE id = #{id}
(</select>)
</select>
(<insert id="insert">)
<insert id="insert">
(INSERT INTO todos (todo, detail, created_at, updated_at))
INSERT INTO todos (todo, detail, created_at, updated_at)
(VALUES (#{todo}, #{detail}, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP))
VALUES (#{todo}, #{detail}, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP)
(</insert>)
</insert>
(<update id="update">)
<update id="update">
(UPDATE todos SET todo = #{todo}, detail = #{detail}, updated_at = CURRENT_TIMESTAMP)
UPDATE todos SET todo = #{todo}, detail = #{detail}, updated_at = CURRENT_TIMESTAMP
(WHERE id = #{id})
WHERE id = #{id}
(</update>)
</update>
(<delete id="delete">)
<delete id="delete">
(DELETE FROM todos WHERE id = #{id})
DELETE FROM todos WHERE id = #{id}
(</delete>)
</delete>
(</mapper>)
</mapper>