net.liftweb.mapper.DB

object DB

object DB

 extends Loggable




Source: DB.scala(30)

Nested Classes

ConnectionHolder,

 Constructors

def this

 Fields

currentConnection.. def currentConnection Box[SuperConnection]
defaultReservedWords.. lazy val defaultReservedWords Set[String]
globalDefaultSchemaName.. var globalDefaultSchemaName Box[String]
jndiJdbcConnAvailable_?.. def jndiJdbcConnAvailable_?
can we get a JDBC connection from JNDI?
Boolean
logger.. protected val logger Logger Loggable
loggingEnabled_?.. def loggingEnabled_? Boolean
queryCollector.. val queryCollector
queryCollector can be used to collect all statements executed in a single request when passed to addLogFunc Use S [details]
queryLog to get the list of (statement, duration) entries or set an analyzer function using S.addAnalyzer
Function2
queryTimeout.. var queryTimeout Box[Int]
reservedWords.. def reservedWords
The SQL reserved words [details]
These words will be changed if they are used for column or table names.
Set[String]
userReservedWords.. var userReservedWords
If you need to change some of the reserved word, you can supply your own set in Boot [details]
scala: DB.userReservedWords = Full(Set("foo", "bar"))
Box[Set[String]]

 Methods

!=.. final def !=(arg0 : Any) Boolean Any
!=.. final def !=(arg0 : Object) Boolean AnyRef
==.. final def ==(arg0 : Object) Boolean AnyRef
==.. final def ==(arg0 : Any) Boolean Any
addLogFunc.. def addLogFunc(f : Function2) List[Function2]
appendPostFunc.. def appendPostFunc(name : ConnectionIdentifier, func : () => Unit)
Append a function to be invoked after the commit has taken place for the given connection identifier
Unit
asInstanceOf.. final def asInstanceOf[T0] T0 Any
buildLoanWrapper.. def buildLoanWrapper(eager : Boolean, in : List[ConnectionIdentifier])
Build a LoanWrapper to pass into S [details]
addAround() to make requests for the List of ConnectionIdentifiers transactional for the complete HTTP request
LoanWrapper
buildLoanWrapper.. def buildLoanWrapper(in : List[ConnectionIdentifier])
Build a LoanWrapper to pass into S [details]
addAround() to make requests for the List of ConnectionIdentifiers transactional for the complete HTTP request
LoanWrapper
buildLoanWrapper.. def buildLoanWrapper(eager : Boolean)
Build a LoanWrapper to pass into S [details]
addAround() to make requests for the DefaultConnectionIdentifier transactional for the complete HTTP request
LoanWrapper
buildLoanWrapper.. def buildLoanWrapper
Build a LoanWrapper to pass into S [details]
addAround() to make requests for the DefaultConnectionIdentifier transactional for the complete HTTP request
LoanWrapper
clone.. protected def clone Object AnyRef
defineConnectionManager.. def defineConnectionManager(name : ConnectionIdentifier, mgr : ConnectionManager) Unit
doWithConnectionManagers.. def doWithConnectionManagers[T](mgrs : (ConnectionIdentifier, ConnectionManager)*)(f : => T)
Allows you to override the connection manager associated with particular connection identifiers for the duration of the call
T
eq.. final def eq(arg0 : Object) Boolean AnyRef
equals.. def equals(arg0 : Any) Boolean AnyRef
exec.. def exec[T](db : SuperConnection, query : String)(f : (ResultSet) => T) T
exec.. def exec[T](statement : PreparedStatement)(f : (ResultSet) => T)
Executes { @code statement } and converts the { @code ResultSet } to model instance { @code T } using { @code f }
T
finalize.. protected def finalize Unit AnyRef
getClass.. final def getClass Class[Any] AnyRef
hashCode.. def hashCode Int AnyRef
isInstanceOf.. final def isInstanceOf[T0] Boolean Any
ne.. final def ne(arg0 : Object) Boolean AnyRef
notify.. final def notify Unit AnyRef
notifyAll.. final def notifyAll Unit AnyRef
performPostCommit.. def performPostCommit(f : => Unit)
perform this function post-commit [details]
THis is helpful for sending messages to Actors after we know a transaction has committed
Unit
performQuery.. def performQuery(query : String, params : List[Any])
Executes the given parameterized query string with the given parameters [details]
Parameters are substituted in order. For Date/Time types, passing a java.util.Date will result in a Timestamp parameter. If you want a specific SQL Date/Time type, use the corresponding java.sql.Date, java.sql.Time, or java.sql.Timestamp classes.
(List[String], List[List[Any]])
performQuery.. def performQuery(query : String) (List[String], List[List[Any]])
performQuery.. def performQuery(query : String, params : List[Any], connectionIdentifier : ConnectionIdentifier)
Executes the given parameterized query string with the given parameters [details]
Parameters are substituted in order. For Date/Time types, passing a java.util.Date will result in a Timestamp parameter. If you want a specific SQL Date/Time type, use the corresponding java.sql.Date, java.sql.Time, or java.sql.Timestamp classes.
(List[String], List[List[Any]])
prepareStatement.. def prepareStatement[T](statement : String, autoColumns : Array[Int], conn : SuperConnection)(f : (PreparedStatement) => T)
Prepares the given statement and then passes it to the given function for use [details]
This method represents a loan pattern, and will automatically handle creation and closing of the PreparedStatement. If the driver supports it, generated keys for the given column indices can be retrieved.
T
prepareStatement.. def prepareStatement[T](statement : String, conn : SuperConnection)(f : (PreparedStatement) => T)
Prepares the given statement and then passes it to the given function for use [details]
This method represents a loan pattern, and will automatically handle creation and closing of the PreparedStatement.
T
prepareStatement.. def prepareStatement[T](statement : String, autokeys : Int, conn : SuperConnection)(f : (PreparedStatement) => T)
Prepares the given statement and then passes it to the given function for use [details]
This method represents a loan pattern, and will automatically handle creation and closing of the PreparedStatement. Retrieval of generated keys is controlled with the autokeys parameter, corresponding to the constants defined on java.sql.Statement: RETURN_GENERATED_KEYS or NO_GENERATED_KEYS
T
prepareStatement.. def prepareStatement[T](statement : String, autoColumns : Array[String], conn : SuperConnection)(f : (PreparedStatement) => T)
Prepares the given statement and then passes it to the given function for use [details]
This method represents a loan pattern, and will automatically handle creation and closing of the PreparedStatement. If the driver supports it, generated keys for the given column names can be retrieved.
T
resultSetTo.. def resultSetTo(rs : ResultSet) (List[String], List[List[String]])
resultSetToAny.. def resultSetToAny(rs : ResultSet) (List[String], List[List[Any]])
rollback.. def rollback(name : ConnectionIdentifier) Unit
runQuery.. def runQuery(query : String, params : List[Any])
Executes the given parameterized query string with the given parameters [details]
Parameters are substituted in order. For Date/Time types, passing a java.util.Date will result in a Timestamp parameter. If you want a specific SQL Date/Time type, use the corresponding java.sql.Date, java.sql.Time, or java.sql.Timestamp classes.
(List[String], List[List[String]])
runQuery.. def runQuery(query : String) (List[String], List[List[String]])
runQuery.. def runQuery(query : String, params : List[Any], connectionIdentifier : ConnectionIdentifier)
Executes the given parameterized query string with the given parameters [details]
Parameters are substituted in order. For Date/Time types, passing a java.util.Date will result in a Timestamp parameter. If you want a specific SQL Date/Time type, use the corresponding java.sql.Date, java.sql.Time, or java.sql.Timestamp classes.
(List[String], List[List[String]])
statement.. def statement[T](db : SuperConnection)(f : (Statement) => T) T
synchronized.. final def synchronized[T0](arg0 : T0) T0 AnyRef
toString.. def toString String AnyRef
use.. def use[T](name : ConnectionIdentifier)(f : (SuperConnection) => T)
Executes function { @code f } with the connection named { @code name } [details]
Releases the connection before returning.
T
wait.. final def wait Unit AnyRef
wait.. final def wait(arg0 : Long) Unit AnyRef
wait.. final def wait(arg0 : Long, arg1 : Int) Unit AnyRef
Copyright (c) 2006-2010 WorldWide Conferencing, LLC. All Rights Reserved.