net.liftweb.db

DB

trait DB extends Loggable

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. DB
  2. Loggable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. case class ConnectionHolder(conn: SuperConnection, cnt: Int, postTransaction: List[(Boolean) ⇒ Unit], rolledBack: Boolean) extends Product with Serializable

  2. type LogFunc = (DBLog, Long) ⇒ Any

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def addLogFunc(f: (DBLog, Long) ⇒ Any): List[(DBLog, Long) ⇒ Any]

  7. def appendPostTransaction(func: (Boolean) ⇒ Unit): Unit

    Append function to be invoked after the current transaction on DefaultConnectionIdentifier has ended

  8. def appendPostTransaction(name: ConnectionIdentifier, func: (Boolean) ⇒ Unit): Unit

    Append a function to be invoked after the transaction on the specified connection identifier has ended.

    Append a function to be invoked after the transaction on the specified connection identifier has ended. The value passed to the function indicates true for success/commit or false for failure/rollback.

    Note: the function will only be called when automatic transaction management is in effect, either by executing within the context of a buildLoanWrapper or a DB.use {}

  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. def buildLoanWrapper(eager: Boolean, in: List[ConnectionIdentifier]): LoanWrapper

    Build a LoanWrapper to pass into S.

    Build a LoanWrapper to pass into S.addAround() to make requests for the List of ConnectionIdentifiers transactional for the complete HTTP request

  11. def buildLoanWrapper(eager: Boolean): LoanWrapper

    Build a LoanWrapper to pass into S.

    Build a LoanWrapper to pass into S.addAround() to make requests for the DefaultConnectionIdentifier transactional for the complete HTTP request

  12. def buildLoanWrapper(in: List[ConnectionIdentifier]): LoanWrapper

    Build a LoanWrapper to pass into S.

    Build a LoanWrapper to pass into S.addAround() to make requests for the List of ConnectionIdentifiers transactional for the complete HTTP request

  13. def buildLoanWrapper(): LoanWrapper

    Build a LoanWrapper to pass into S.

    Build a LoanWrapper to pass into S.addAround() to make requests for the DefaultConnectionIdentifier transactional for the complete HTTP request

  14. def checkNull[T](rs: ResultSet, pos: Int, res: ⇒ T): T

  15. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  16. def currentConnection: Box[SuperConnection]

  17. lazy val defaultReservedWords: Set[String]

    The default reserved words.

    The default reserved words.

    TODO : Maybe this should be refactored to allow for driver-specific reserved words

  18. def defineConnectionManager(name: ConnectionIdentifier, mgr: ConnectionManager): Unit

  19. def doWithConnectionManagers[T](mgrs: (ConnectionIdentifier, ConnectionManager)*)(f: ⇒ T): T

    Allows you to override the connection manager associated with particular connection identifiers for the duration of the call.

  20. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  21. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  22. def exec[T](statement: PreparedStatement)(f: (ResultSet) ⇒ T): T

    Executes { @code statement } and converts the { @code ResultSet } to model instance { @code T } using { @code f }

  23. def exec[T](db: SuperConnection, query: String)(f: (ResultSet) ⇒ T): T

  24. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  25. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  26. var globalDefaultSchemaName: Box[String]

  27. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  28. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  29. def jndiJdbcConnAvailable_?: Boolean

    can we get a JDBC connection from JNDI?

  30. val logger: Logger

    Attributes
    protected
    Definition Classes
    Loggable
  31. def loggingEnabled_?: Boolean

  32. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  33. final def notify(): Unit

    Definition Classes
    AnyRef
  34. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  35. def performQuery(query: String): (List[String], List[List[Any]])

  36. def performQuery(query: String, params: List[Any], connectionIdentifier: ConnectionIdentifier): (List[String], List[List[Any]])

    Executes the given parameterized query string with the given parameters.

    Executes the given parameterized query string with the given parameters. 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.

  37. def performQuery(query: String, params: List[Any]): (List[String], List[List[Any]])

    Executes the given parameterized query string with the given parameters.

    Executes the given parameterized query string with the given parameters. 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.

  38. def prepareStatement[T](statement: String, autoColumns: Array[String], conn: SuperConnection)(f: (PreparedStatement) ⇒ T): T

    Prepares the given statement and then passes it to the given function for use.

    Prepares the given statement and then passes it to the given function for use. 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.

  39. def prepareStatement[T](statement: String, autoColumns: Array[Int], conn: SuperConnection)(f: (PreparedStatement) ⇒ T): T

    Prepares the given statement and then passes it to the given function for use.

    Prepares the given statement and then passes it to the given function for use. 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.

  40. def prepareStatement[T](statement: String, autokeys: Int, conn: SuperConnection)(f: (PreparedStatement) ⇒ T): T

    Prepares the given statement and then passes it to the given function for use.

    Prepares the given statement and then passes it to the given function for use. 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

  41. def prepareStatement[T](statement: String, conn: SuperConnection)(f: (PreparedStatement) ⇒ T): T

    Prepares the given statement and then passes it to the given function for use.

    Prepares the given statement and then passes it to the given function for use. This method represents a loan pattern, and will automatically handle creation and closing of the PreparedStatement.

  42. var queryCollector: (DBLog, Long) ⇒ Any

    queryCollector can be used to collect all statements executed in a single request when passed to addLogFunc

    queryCollector can be used to collect all statements executed in a single request when passed to addLogFunc

    Use S.queryLog to get the list of (statement, duration) entries or set an analyzer function using S.addAnalyzer

  43. var queryTimeout: Box[Int]

  44. def reservedWords: Set[String]

    The SQL reserved words.

    The SQL reserved words. These words will be changed if they are used for column or table names.

  45. def resultSetTo(rs: ResultSet): (List[String], List[List[String]])

  46. def resultSetToAny(rs: ResultSet): (List[String], List[List[Any]])

  47. def rollback: Unit

  48. def rollback(name: ConnectionIdentifier): Unit

  49. def runQuery(query: String): (List[String], List[List[String]])

  50. def runQuery(query: String, params: List[Any], connectionIdentifier: ConnectionIdentifier): (List[String], List[List[String]])

    Executes the given parameterized query string with the given parameters.

    Executes the given parameterized query string with the given parameters. 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.

  51. def runQuery(query: String, params: List[Any]): (List[String], List[List[String]])

    Executes the given parameterized query string with the given parameters.

    Executes the given parameterized query string with the given parameters. 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.

  52. def runUpdate(query: String, params: List[Any], connectionIdentifier: ConnectionIdentifier): Int

    Executes the given parameterized update string with the given parameters.

    Executes the given parameterized update string with the given parameters. 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.

  53. def runUpdate(query: String, params: List[Any]): Int

    Executes the given parameterized update string with the given parameters.

    Executes the given parameterized update string with the given parameters. 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.

  54. def statement[T](db: SuperConnection)(f: (Statement) ⇒ T): T

  55. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  56. def toString(): String

    Definition Classes
    AnyRef → Any
  57. def use[T](name: ConnectionIdentifier)(f: (SuperConnection) ⇒ T): T

    Executes function { @code f } with the connection named { @code name }.

    Executes function { @code f } with the connection named { @code name }. Releases the connection before returning.

    Only use within a stateful request

  58. var userReservedWords: Box[Set[String]]

    If you need to change some of the reserved word, you can supply your own set in Boot.

    If you need to change some of the reserved word, you can supply your own set in Boot.scala: DB.userReservedWords = Full(Set("foo", "bar"))

  59. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  60. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  61. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def appendPostFunc(name: ConnectionIdentifier, func: () ⇒ Unit): Unit

    Append a function to be invoked after the transaction has ended for the given connection identifier

    Append a function to be invoked after the transaction has ended for the given connection identifier

    Annotations
    @deprecated
    Deprecated

    (Since version 2.4) Use appendPostTransaction (name, {committed => ...})

  2. def performPostCommit(f: ⇒ Unit): Unit

    perform this function after transaction has ended.

    perform this function after transaction has ended. This is helpful for sending messages to Actors after we know a transaction has been either committed or rolled back

    Annotations
    @deprecated
    Deprecated

    (Since version 2.4) Use appendPostTransaction {committed => ...}

Inherited from Loggable

Inherited from AnyRef

Inherited from Any

Ungrouped