ToDoMapper.xml
関連タイピング
-
プレイ回数30英語長文492打
-
プレイ回数46英語長文628打
-
プレイ回数37英語113打
-
プレイ回数47英語長文398打
-
プレイ回数33英語長文184打
-
プレイ回数31英語長文168打
-
プレイ回数39英語長文279打
-
プレイ回数27英語長文771打
問題文
(<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>