Created
October 15, 2011 13:09
-
-
Save fbettag/1289536 to your computer and use it in GitHub Desktop.
Mapper Field-Classes to utilize PostgreSQL's CIDR and MAC Type
This file contains hidden or 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
abstract class MappedCIDR[A <: Mapper[A]](override val fieldOwner: A) extends MappedString[A](fieldOwner, 132) { | |
override val maxLen = 132 | |
override def fieldCreatorString(dbType: DriverType, colName: String): String = colName+" cidr" | |
} | |
abstract class MappedMAC[A <: Mapper[A]](override val fieldOwner: A) extends MappedString[A](fieldOwner, 18) { | |
override val maxLen = 18 | |
override def fieldCreatorString(dbType: DriverType, colName: String): String = colName+" macaddr" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment