update Last Login

@Modifying(clearAutomatically = true )
@Query(value = ""UPDATE " + USER_DEVICES_KEY + " SET " + LAST_LOGIN_KEY + "=:" + LAST_LOGIN_KEY + _WHERE_ + USER_IDENTIFIER_KEY + "=:" + USER_IDENTIFIER_KEY + " AND " + DEVICE_IDENTIFIER_KEY + "=:" + DEVICE_IDENTIFIER_KEY", nativeQuery = true )
abstract fun updateLastLogin(@Param(value = "user_id") userId: String, @Param(value = "device_id") deviceId: String, @Param(value = "last_login") lastLogin: Long)

Query used to update the last login by a device in the specified session

Parameters

userId

The identifier of the user

deviceId

The identifier of the device

lastLogin

The last login timestamp