James Talvy
asked on
Simple compare in Scala against a constant string...
How to compare a String in scala against a constant value?
def desks(sorted:Boolean, includeNtf:Boolean) = {
val output = for {
desk <- TableQuery[Desks] if(includeNtf && desk.test === Some("Y"))
}
I want to set "desk" to only the records in TableQuery[Desks] that have test="Y"
test is type String
This does not work with various errors... desk.test === Some("Y")
I have never touched scala code before.
Thanks
def desks(sorted:Boolean, includeNtf:Boolean) = {
val output = for {
desk <- TableQuery[Desks] if(includeNtf && desk.test === Some("Y"))
}
I want to set "desk" to only the records in TableQuery[Desks] that have test="Y"
test is type String
This does not work with various errors... desk.test === Some("Y")
I have never touched scala code before.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.