updateLink

@Modifying(clearAutomatically = true)
@Query(value = ""UPDATE " + LINKS_KEY + " SET " + TITLE_KEY + "=:" + TITLE_KEY + "," + DESCRIPTION_KEY + "=:" + DESCRIPTION_KEY + "," + EXPIRED_TIME_KEY + "=" + ":#{#" + EXPIRED_TIME_KEY + ".name()}," + UNIQUE_ACCESS_KEY + "=:" + UNIQUE_ACCESS_KEY + " WHERE " + LINK_IDENTIFIER_KEY + "=:" + LINK_IDENTIFIER_KEY + " AND " + OWNER_KEY + "=:" + OWNER_KEY", nativeQuery = true)
abstract fun updateLink(@Param(value = "link_id") linkId: String, @Param(value = "title") title: String, @Param(value = "description") description: String, @Param(value = "expired_time") expiredTime: CustomRefyLink.ExpiredTime, @Param(value = "unique_access") hasUniqueAccess: Boolean, @Param(value = "owner") owner: String)

Method to execute the query to save a link

Parameters

linkId

: the identifier of the link

title

: the title of the link

description

: the description of the link

expiredTime

: the expiration time set for the link

hasUniqueAccess

: whether the link has the unique access

owner

: the owner of the link