Last active
January 1, 2019 16:54
-
-
Save manishkkatoch/6d17e5b8fba602b80288619323b3dca1 to your computer and use it in GitHub Desktop.
PropertyExists trait
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
@implicitNotFound(msg = "${PName} not found in ${T}") | |
trait PropertyExists[T, PName, PType] | |
object PropertyExists { | |
def apply[T, PType](column: Witness)( | |
implicit exists: PropertyExists[T, column.T, PType]): PropertyExists[T, column.T, PType] = | |
exists | |
implicit def implicitProvider[T, H <: HList, PName, PType]( | |
implicit | |
gen: LabelledGeneric.Aux[T, H], | |
selector: Selector.Aux[H, PName, PType] | |
): PropertyExists[T, PName, PType] = new PropertyExists[T, PName, PType] {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment