2
** ________ ___ / / ___ Scala API **
3
** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL **
4
** __\ \/ /__/ __ |/ /__/ __ | **
5
** /____/\___/_/ |_/____/_/ | | **
15
/** A statement that changes the status of the database. */
16
@deprecated(DbcIsDeprecated, "2.9.0") case class Transaction [ResultType] (
17
transactionBody: (scala.dbc.Database=>ResultType),
18
accessMode: Option[AccessMode],
19
isolationLevel: Option[IsolationLevel]
22
/** A SQL-99 compliant string representation of the statement. */
23
def sqlStartString: String = (
25
(Pair(accessMode,isolationLevel) match {
26
case Pair(None,None) => ""
27
case Pair(Some(am),None) => " " + am.sqlString
28
case Pair(None,Some(il)) => " " + il.sqlString
29
case Pair(Some(am),Some(il)) => " " + am.sqlString + ", " + il.sqlString
33
def sqlCommitString: String = {
37
def sqlAbortString: String = {
41
//def transactionBody: (()=>Unit);
43
//def accessMode: Option[AccessMode];
45
//def isolationLevel: Option[IsolationLevel];
47
def execute (database: scala.dbc.Database): scala.dbc.result.Status[ResultType] = {
48
database.executeStatement(this);
51
def execute (database: scala.dbc.Database, debug: Boolean): scala.dbc.result.Status[ResultType] = {
52
database.executeStatement(this,debug);