<commit_before>package io.vamp.core.persistence.store.jdbc

import com.typesafe.scalalogging.Logger
import io.vamp.core.model.artifact.EnvironmentVariable
import io.vamp.core.persistence.notification.PersistenceNotificationProvider
import io.vamp.core.persistence.slick.model.EnvironmentVariableModel
import io.vamp.core.persistence.slick.model.EnvironmentVariableParentType.EnvironmentVariableParentType
import org.slf4j.LoggerFactory

import scala.slick.jdbc.JdbcBackend


trait EnvironmentVariableStore extends PersistenceNotificationProvider {

  implicit val sess: JdbcBackend.Session

  import io.vamp.core.persistence.slick.components.Components.instance._

  private val logger = Logger(LoggerFactory.getLogger(classOf[EnvironmentVariableStore]))

  protected def createEnvironmentVariables(envVars: List[EnvironmentVariable], t: EnvironmentVariableParentType, parentId: Int, deploymentId: Option[Int]): Unit =
    for (env <- envVars)
      EnvironmentVariables.add(EnvironmentVariableModel(deploymentId = deploymentId, name = env.name, alias = env.alias, value = env.value, interpolated = env.interpolated, parentId = Some(parentId), parentType = Some(t)))<commit_msg>resolving some warnings<commit_after>package io.vamp.core.persistence.store.jdbc

import io.vamp.core.model.artifact.EnvironmentVariable
import io.vamp.core.persistence.notification.PersistenceNotificationProvider
import io.vamp.core.persistence.slick.model.EnvironmentVariableModel
import io.vamp.core.persistence.slick.model.EnvironmentVariableParentType.EnvironmentVariableParentType

import scala.slick.jdbc.JdbcBackend


trait EnvironmentVariableStore extends PersistenceNotificationProvider {

  implicit val sess: JdbcBackend.Session

  import io.vamp.core.persistence.slick.components.Components.instance._

  protected def createEnvironmentVariables(envVars: List[EnvironmentVariable], t: EnvironmentVariableParentType, parentId: Int, deploymentId: Option[Int]): Unit =
    for (env <- envVars)
      EnvironmentVariables.add(EnvironmentVariableModel(deploymentId = deploymentId, name = env.name, alias = env.alias, value = env.value, interpolated = env.interpolated, parentId = Some(parentId), parentType = Some(t)))
{'fraction_non_alphanumeric': 0.08756805807622504, 'fraction_numerical': 0.00045372050816696913, 'mean_word_length': 6.96028880866426, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '422566', 'n_tokens_mistral': 597, 'n_tokens_neox': 594, 'n_words': 109}