Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide mechanism to convert to case classes more easily than .map #12

Closed
freeeve opened this issue Feb 9, 2013 · 1 comment
Closed

Comments

@freeeve
Copy link
Member

freeeve commented Feb 9, 2013

Right now you can do:

case class MyCaseClass(n:String, a:Int)

Cypher("start n=node(1) return n.name, n.age")().map(row =>
  MyCaseClass(row[String]("n.name"), row[Int]("n.age")))
// returns Stream[MyCaseClass]

I'd rather make something like:

Cypher("start n=node(1) return n.name, n.age")().as[MyCaseClass]
// returns Stream[MyCaseClass]
@freeeve freeeve closed this as completed Feb 11, 2014
@freeeve
Copy link
Member Author

freeeve commented Feb 11, 2014

cleaning up issues. this probably won't get into anormcypher until it's easier to do without reflection and weird hacks. map() isn't so bad, after all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant