Created
January 2, 2014 14:44
-
-
Save davidgrenier/8220192 to your computer and use it in GitHub Desktop.
Pattern matching query
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
query { | |
for order in db.Orders do | |
let status = | |
match order.Status with | |
| 0 | 1 -> "Cancelled/Returned" | |
| _ -> "Valid" | |
where (status = "Valid") | |
select order | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment