VALUES (#{name}, #{checksum}, current_timestamp, current_timestamp, #{lockedAt})
</insert>
+ <insert id="initialize" databaseId="oracle" parameterType="map" useGeneratedKeys="false">
+ <selectKey order="BEFORE" resultType="Long" keyProperty="id">
+ select semaphores_seq.NEXTVAL from DUAL
+ </selectKey>
+ INSERT INTO semaphores (id, name, checksum, created_at, updated_at, locked_at)
+ VALUES (#{id}, #{name}, #{checksum}, current_timestamp, current_timestamp, #{lockedAt})
+ </insert>
+
<select id="now" resultType="Date">
select current_timestamp
</select>
+ <select id="now" databaseId="oracle" resultType="Date">
+ select current_timestamp from dual
+ </select>
+
<update id="acquire" parameterType="map">
update semaphores
set updated_at = current_timestamp, locked_at = current_timestamp