field.scala

来自「JAVA 语言的函数式编程扩展」· SCALA 代码 · 共 64 行

SCALA
64
字号
/*                     __                                               *\**     ________ ___   / /  ___     Scala API                            ****    / __/ __// _ | / /  / _ |    (c) 2003-2007, LAMP/EPFL             ****  __\ \/ /__/ __ |/ /__/ __ |                                         **** /____/\___/_/ |_/____/_/ | |                                         ****                          |/                                          **\*                                                                      */// $Id:Field.scala 6853 2006-03-20 16:58:47 +0100 (Mon, 20 Mar 2006) dubochet $package scala.dbc.resultimport scala.dbc.datatype._import scala.dbc.value._/** An ISO-9075:2003 (SQL) table field. */abstract class Field {  /** The content (value) of the field. The type of this value is undefined,   *  transformation into a useful type will be done by an automatic view   *  function defined in the field object.   */  def content: Value  final def value[Type <: Value]: Type =    content.asInstanceOf[Type]  final def exactNumericValue[NativeType] =    content.asInstanceOf[dbc.value.ExactNumeric[NativeType]]  final def approximateNumericValue[NativeType] =    content.asInstanceOf[dbc.value.ApproximateNumeric[NativeType]]  final def booleanValue =    content.asInstanceOf[dbc.value.Boolean]  final def characterValue =    content.asInstanceOf[dbc.value.Character]  final def characterLargeObjectValue =    content.asInstanceOf[dbc.value.CharacterLargeObject]  final def characterVaryingValue =    content.asInstanceOf[dbc.value.CharacterVarying]  final def unknownValue =    content.asInstanceOf[dbc.value.Unknown]  /** The tuple that contains this field. */  def originatingTuple: Tuple  /** The field metadata attached to this field. */  def metadata: FieldMetadata}object Field {  implicit def fieldToValue (field: Field): Value = field.content}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?