store Analytic

@Modifying(clearAutomatically = true )
@Query(value = "INSERT INTO " + PERFORMANCE_ANALYTICS_KEY + " (" + IDENTIFIER_KEY + "," + CREATION_DATE_KEY + "," + APP_VERSION_KEY + "," + PLATFORM_KEY + "," + DATA_UPDATES_KEY + "," + PERFORMANCE_ANALYTIC_TYPE_KEY + "," + PERFORMANCE_VALUE_KEY + "," + APPLICATION_IDENTIFIER_KEY + ") VALUES (" + ":" + IDENTIFIER_KEY + "," + ":" + CREATION_DATE_KEY + "," + ":" + APP_VERSION_KEY + "," + ":#{#" + PLATFORM_KEY + ".name()}" + "," + ":" + DATA_UPDATES_KEY + "," + ":#{#" + PERFORMANCE_ANALYTIC_TYPE_KEY + ".name()}" + "," + ":" + PERFORMANCE_VALUE_KEY + "," + ":" + APPLICATION_IDENTIFIER_KEY + ")", nativeQuery = true )
abstract fun storeAnalytic(@Param(value = "id") id: String, @Param(value = "creation_date") creationDate: Long, @Param(value = "app_version") appVersion: String, @Param(value = "platform") platform: Platform, @Param(value = "data_updates") updates: Int, @Param(value = "performance_analytic_type") type: PerformanceAnalytic.PerformanceAnalyticType, @Param(value = "value") value: Double, @Param(value = "application_id") applicationId: String)

Method to store a new analytic in the system

Parameters

id

The identifier of the analytic

creationDate

The date when the analytic has been inserted in the system

appVersion

The application version related to the analytic

platform

The platform version related to the analytic

updates

The updates number executed on the analytic

type

The type of the analytic

value

The representative value of the analytic

applicationId

The application identifier related to the analytic