scala.dbc.result
class Relation

[source: `scala/dbc/result/Relation.scala`]

`abstract` `class` Relation
  `extends` 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. ### 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.
`def` | metadata : List[FieldMetadata] Metadata about all fields in a tuple of the relation.
`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.
`def` | metadataFor (index : Int) : Option[FieldMetadata] Metadata about the field at the given index. If there is no such field `None` is returned instead.
`protected def` | sqlMetadata : ResultSetMetaData A JDBC metadata object attached to the relation.
`protected abstract def` | sqlResult : ResultSet A JDBC result containing this relation.
`abstract def` | statement : Relation The statement that generated this relation.

Methods inherited from Iterable
concat, ++, map, flatMap, filter, takeWhile, dropWhile, take, drop, foreach, forall, exists, find, findIndexOf, indexOf, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, copyToBuffer, sameElements, toList, toStream, mkString, mkString, mkString, addString, addString, copyToArray, isEmpty, projection, hasDefiniteSize

Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized

Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf

Method Details

`abstract` `def` statement : Relation

  The statement that generated this relation.

`protected abstract` `def` sqlResult : ResultSet

  A JDBC result containing this relation.

`protected` `def` sqlMetadata : ResultSetMetaData

  A JDBC metadata object attached to 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. If there is no such field `None` is returned instead.

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

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

Overrides
  Iterable.elements