sealed abstract class Meta[A] extends AnyRef
Metadata defining the column-level mapping to and from Scala type A
. A given Scala type might
be read from or written to columns with a variety of JDBC and/or vendor-specific types,
depending on supported coercions and luck.
Reading and writing values to JDBC is asymmetric with respect to null
, is complicated by
unboxed types, and is not consistent with idiomatic Scala; so some discussion is required.
Scala values should never be null
. Setting a NULL
JDBC value is accomplished via the
setNull
operation. Similarly when getting a JDBC value we must subsequently ask .wasNull
on the JDBC resource and decide how to handle the value. The Atom
typeclass takes care of
mapping nullable values to Option
so these issues should not be a concern for casual users.
- Annotations
- @implicitNotFound( ... )
- Source
- meta.scala
- Alphabetic
- By Inheritance
- Meta
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
fold[B](f: (BasicMeta[A]) ⇒ B, g: (AdvancedMeta[A]) ⇒ B): B
Switch on the flavor of this
Meta
. -
abstract
def
jdbcSource: NonEmptyList[JdbcType]
Source JDBC types from which values of type
A
can be read. -
abstract
def
jdbcTarget: NonEmptyList[JdbcType]
Destination JDBC types to which values of type
A
can be written. -
abstract
def
scalaType: String
Name of the Scala type, for diagnostic purposes.
Name of the Scala type, for diagnostic purposes. Smart constructors require a
TypeTag
to guarantee this value is correct. -
abstract
def
xmap[B](f: (A) ⇒ B, g: (B) ⇒ A)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[B]): Meta[B]
Invariant map.
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- final def unsafeGetNonNullable(rs: ResultSet, n: Int): A
- final def unsafeGetNullable(rs: ResultSet, n: Int): Option[A]
- final def unsafeSetNonNullable(ps: PreparedStatement, n: Int, a: A): Unit
- final def unsafeSetNull(ps: PreparedStatement, n: Int): Unit
- final def unsafeSetNullable(ps: PreparedStatement, n: Int, oa: Option[A]): Unit
- final def unsafeUpdateNonNullable(rs: ResultSet, n: Int, a: A): Unit
- final def unsafeUpdateNullable(rs: ResultSet, n: Int, oa: Option[A]): Unit
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
nxmap[B >: Null](f: (A) ⇒ B, g: (B) ⇒ A)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[B], ev: <:<[Null, A]): Meta[B]
Invariant map with
null
handling, forA, B >: Null
; the functionsf
andg
will never be passed anull
value.Invariant map with
null
handling, forA, B >: Null
; the functionsf
andg
will never be passed anull
value.- Annotations
- @deprecated
- Deprecated
(Since version 0.4.2) Null is no longer observable here; just use xmap.