Created
July 24, 2015 06:35
-
-
Save gakuzzzz/38fa8ce77eb4000a05c1 to your computer and use it in GitHub Desktop.
ぶんかつ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import enumlike.{EnumCompanionBase, EnumLike} | |
import scalikejdbc._ | |
trait ScalikeJDBCEnumCompanion { | |
self: EnumCompanionBase => | |
implicit def optionalTypeBinder(implicit ev: TypeBinder[EnumLikeType#ValueType]): TypeBinder[Option[A]] = ev.map(valueOf) | |
implicit def typeBinder(implicit ev: TypeBinder[EnumLikeType#ValueType]): TypeBinder[A] = optionalTypeBinder(ev).map(_.get) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment