in scala/dbc/result
class Relation

abstract class Relation()
extends Object
with ScalaObject
with Iterable[Tuple]

An ISO-9075:2003 (SQL) table. This is equivalent to a relation in the relational model.

Method Summary
  def elements: Iterator[Tuple]
     An iterator on the tuples of the relation.
  def metadata: List[FieldMetadata]
     Metadata about all fields in a tuple of the relation.
  def metadataFor(index: Int): Option[FieldMetadata]
     Metadata about the field at the given index.
  def metadataFor(name: String): Option[FieldMetadata]
     Metadata about the field with the given column name.
protected def sqlMetadata: java.sql.ResultSetMetaData
     A JDBC metadata object attached to the relation.
protected abstract def sqlResult: java.sql.ResultSet
     A JDBC result containing this relation.
abstract def statement: Relation
     The statement that generated this relation.

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/Iterable-class
/:, :\, concat, exists, find, foldLeft, foldRight, forall, foreach, sameElements

Methods inherited from scala/ScalaObject-class
getScalaType

Method Detail

statement

  abstract def statement: Relation
The statement that generated this relation.

sqlResult

  protected abstract def sqlResult: java.sql.ResultSet
A JDBC result containing this relation.

sqlMetadata

  protected def sqlMetadata: java.sql.ResultSetMetaData
A JDBC metadata object attached to the relation.

metadata

  def metadata: List[FieldMetadata]
Metadata about all fields in a tuple of the relation.

metadataFor

  def metadataFor(index: Int): Option[FieldMetadata]
Metadata about the field at the given index. If there is no such field None is returned instead.

metadataFor

  def metadataFor(name: String): Option[FieldMetadata]
Metadata about the field with the given column name. If there is no such field, None is returned instead.

elements

  def elements: Iterator[Tuple]
An iterator on the tuples of the relation.

Caution

A Relation only has one single iterator, due to limitations in DBMS. This means that if this method is called multiple times, all returned iterators will share the same state.