in scala/dbc/statement
class Select

abstract class Select()
extends Relation
with ScalaObject

A statement that when executed on a database will return a relation. The returned relation will be a subset of a table in the database or a jointure between such subsets.

Method Summary
abstract def fromClause: List[Relation]
     Defines the relations from which the query will obtain its data.
abstract def groupByClause: Option[List[Expression]]
     Defines the grouping of the returned relation's tuples.
abstract def havingClause: Option[Expression]
     Defines conditions that must be true in the returned relation's tuples.
abstract def selectList: List[DerivedColumn]
     Defines the output fields that a tuple in the returned relation will contain, and their content with respect to the tables in the database.
abstract def setQuantifier: Option[SetQuantifier]
     Defines if duplicated tuples should be removed from the returned relation.
  def sqlInnerString: String
     A SQL-99 compliant string representation of the relation sub- statement.
  def sqlString: String
     A SQL-99 compliant string representation of the select statement.
abstract def whereClause: Option[Expression]
     Defines condition that must be true in the returned relation's tuples.

Methods inherited from java/lang/Object-class
clone, eq, equals, finalize, getClass, hashCode, ne, notify, notifyAll, synchronized, toString, wait, wait, wait

Methods inherited from scala/Any-class
!=, ==, asInstanceOf, isInstanceOf, match

Methods inherited from scala/ScalaObject-class
getScalaType

Methods inherited from scala/dbc/statement/Relation-class
execute, execute, fieldTypes, isCompatibleType, sqlTypeString, typeCheck

Method Detail

setQuantifier

  abstract def setQuantifier: Option[SetQuantifier]
Defines if duplicated tuples should be removed from the returned relation.

Compatibility notice

Some DBMS (PostgreSQL) allow uniqueness constrains on an arbitrary field instead of the entire tuple.

selectList

  abstract def selectList: List[DerivedColumn]
Defines the output fields that a tuple in the returned relation will contain, and their content with respect to the tables in the database. If the fields are not specified (that is the list is empty), all possible input fields will be returned.

Compatibility notice

SQL's qualified asterisk select sublist is not available.

fromClause

  abstract def fromClause: List[Relation]
Defines the relations from which the query will obtain its data.

whereClause

  abstract def whereClause: Option[Expression]
Defines condition that must be true in the returned relation's tuples. This value expression must return a boolean or boolean-compatible value. This condition is applied before any GROUP BY clause.

groupByClause

  abstract def groupByClause: Option[List[Expression]]
Defines the grouping of the returned relation's tuples. One tuple is returned for every group. The value of selectList must use aggregate functions for calculation.

havingClause

  abstract def havingClause: Option[Expression]
Defines conditions that must be true in the returned relation's tuples. The value expression must return a boolean can only refer to fields that are grouped or to any field from inside an aggregate function.

sqlString

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

sqlInnerString

  def sqlInnerString: String
A SQL-99 compliant string representation of the relation sub- statement. This only has a meaning inside a query.