Skip to content

Instantly share code, notes, and snippets.

@karthik20522
Created May 25, 2019 06:46
Show Gist options
  • Save karthik20522/4de772104294f678bd65660f0f9e77a1 to your computer and use it in GitHub Desktop.
Save karthik20522/4de772104294f678bd65660f0f9e77a1 to your computer and use it in GitHub Desktop.
select count(name) from users
case class Count(val field: String)
def count: Parser[Count] = "select" ~ "count" ~> "(" ~> ident <~ ")" ^^ {
case exp => Count(exp)
}
//output: Count("name")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment