Trait/Object

net.liftweb.db

DB

Related Docs: object DB | package db

Permalink

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
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

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

    Permalink

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addLogFunc(f: LogFunc): List[LogFunc]

    Permalink
  5. def appendPostTransaction(func: (Boolean) ⇒ Unit): Unit

    Permalink

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

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

    Permalink

    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 {}

  7. final def asInstanceOf[T0]: T0

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

    Permalink

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

  9. def buildLoanWrapper(eager: Boolean): LoanWrapper

    Permalink

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

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

    Permalink

    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(): LoanWrapper

    Permalink

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

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

    Permalink
  13. def clone(): AnyRef

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

    Permalink
  15. lazy val defaultReservedWords: Set[String]

    Permalink

    The default reserved words.

    The default reserved words.

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

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

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

    Permalink

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

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

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

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

    Permalink

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

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

    Permalink
  22. def finalize(): Unit

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

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

    Permalink
  25. def hashCode(): Int

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

    Permalink
    Definition Classes
    Any
  27. def jndiJdbcConnAvailable_?: Boolean

    Permalink

    can we get a JDBC connection from JNDI?

  28. val logger: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable
  29. def loggingEnabled_?: Boolean

    Permalink
  30. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  31. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit

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

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

    Permalink

    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.

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

    Permalink

    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.

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

    Permalink

    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.

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

    Permalink

    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.

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

    Permalink

    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

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

    Permalink

    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.

  40. var queryCollector: LogFunc

    Permalink

    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

  41. var queryTimeout: Box[Int]

    Permalink
  42. def reservedWords: Set[String]

    Permalink

    The SQL reserved words.

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

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

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

    Permalink
  45. def rollback: Unit

    Permalink
  46. def rollback(name: ConnectionIdentifier): Unit

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

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

    Permalink

    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.

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

    Permalink

    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.

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

    Permalink

    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.

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

    Permalink

    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.

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

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

    Permalink
    Definition Classes
    AnyRef
  54. def toString(): String

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

    Permalink

    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

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

    Permalink

    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"))

  57. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Loggable

Inherited from AnyRef

Inherited from Any

Ungrouped