Skip to content

Instantly share code, notes, and snippets.

@pedrofurla
Created July 1, 2013 03:25
Show Gist options
  • Save pedrofurla/5898177 to your computer and use it in GitHub Desktop.
Save pedrofurla/5898177 to your computer and use it in GitHub Desktop.
auto increment insert in slick. There must be better way.
def autoInc = * returning id.? into {
case (Person(_, a, b,c ,d), id) => Person(id, a, b, c, d)
}
def autoInc2 = fullName ~ birthday ~ login ~ password returning id.? into {
case (m, id) => Function.uncurried(((Person.apply _).curried(id))).tupled(m)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment