<commit_before>package net.liftweb.mapper

/*                                                *\
 (c) 2006 WorldWide Conferencing, LLC
 Distributed under an Apache License
 http://www.apache.org/licenses/LICENSE-2.0
 \*                                                 */

import scala.collection.mutable._
import java.lang.reflect.Method
import java.sql.{ResultSet, Types}
import scala.xml.{Elem, Node, NodeSeq}
import net.liftweb.http.S
import S._

trait Mapper[A<:Mapper[A]] {
  private val secure_# = Safe.next
  private var was_deleted_? = false
  private var dbConnectionIdentifier:ConnectionIdentifier = DefaultConnectionIdentifier
  
  def getSingleton : MetaMapper[A];
  final def safe_? : boolean = {
    Safe.safe_?(secure_#)
  }
  
  implicit def thisToMappee(in: Mapper[A]): A = this.asInstanceOf[A]
  
  def runSafe[T](f : => T) : T = {
    Safe.runSafe(secure_#)(f)
  }
  <commit_msg>The mapper instances get the default db connection identifier from their singleton<commit_after>package net.liftweb.mapper

/*                                                *\
 (c) 2006 WorldWide Conferencing, LLC
 Distributed under an Apache License
 http://www.apache.org/licenses/LICENSE-2.0
 \*                                                 */

import scala.collection.mutable._
import java.lang.reflect.Method
import java.sql.{ResultSet, Types}
import scala.xml.{Elem, Node, NodeSeq}
import net.liftweb.http.S
import S._

trait Mapper[A<:Mapper[A]] {
  private val secure_# = Safe.next
  private var was_deleted_? = false
  private var dbConnectionIdentifier:ConnectionIdentifier = getSingleton.dbDefaultConnectionIdentifier
  
  def getSingleton : MetaMapper[A];
  final def safe_? : boolean = {
    Safe.safe_?(secure_#)
  }
  
  implicit def thisToMappee(in: Mapper[A]): A = this.asInstanceOf[A]
  
  def runSafe[T](f : => T) : T = {
    Safe.runSafe(secure_#)(f)
  }
  
{'fraction_non_alphanumeric': 0.1080937167199148, 'fraction_numerical': 0.006389776357827476, 'mean_word_length': 2.634429400386847, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7481735', 'n_tokens_mistral': 585, 'n_tokens_neox': 573, 'n_words': 133}