summaryrefslogtreecommitdiff
path: root/src/dbc/scala/dbc/statement/Status.scala
blob: 88a8f1feed1618bd1219640c9c34ba0beec82cfd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*                     __                                               *\
**     ________ ___   / /  ___     Scala API                            **
**    / __/ __// _ | / /  / _ |    (c) 2003-2009, LAMP/EPFL             **
**  __\ \/ /__/ __ |/ /__/ __ |    http://scala-lang.org/               **
** /____/\___/_/ |_/____/_/ | |                                         **
**                          |/                                          **
\*                                                                      */

// $Id$


package scala.dbc
package statement

import scala.dbc.Database
import scala.dbc.result

/** A statement that changes the status of the database. */
abstract class Status extends Statement {

  /** A SQL-99 compliant string representation of the statement. */
  def sqlString: String

  /** Executes the statement on the given database. */
  def execute(database: Database): result.Status[Unit] = {
    database.executeStatement(this)
  }

  def execute(database: Database, debug: Boolean): result.Status[Unit] = {
    database.executeStatement(this, debug)
  }

}