Skip to content

Commit

Permalink
Cut upserts down to a single new Type, added the ability to do nothin…
Browse files Browse the repository at this point in the history
…g on conflict
  • Loading branch information
Stephen Carman committed Oct 20, 2016
1 parent a00dc10 commit ddd201f
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,12 @@ trait Unliftables {
}

implicit val actionUnliftable: Unliftable[Action] = Unliftable[Action] {
case q"$pack.Update.apply(${ a: Ast }, ${ b: List[Assignment] })" => Update(a, b)
case q"$pack.Insert.apply(${ a: Ast }, ${ b: List[Assignment] })" => Insert(a, b)
case q"$pack.Upsert.apply(${ a: Ast }, ${ b: List[Assignment] })" => Upsert(a, b)
case q"$pack.Conflict.apply(${ a: Ast }, ${ b: Ident }, ${ c: Ast })" => Conflict(a, b, c)
case q"$pack.ConflictUpdate.apply(${ a: Ast }, ${ b: List[Assignment]})" => ConflictUpdate(a, b)
case q"$pack.Delete.apply(${ a: Ast })" => Delete(a)
case q"$pack.Update.apply(${ a: Ast }, ${ b: List[Assignment] })" => Update(a, b)
case q"$pack.Insert.apply(${ a: Ast }, ${ b: List[Assignment] })" => Insert(a, b)
case q"$pack.Conflict.apply(${ a: Ast }, ${ b: Ident }, ${ c: Ast }, ${ d: List[Assignment] })" => Conflict(a, b, c, d)
case q"$pack.Delete.apply(${ a: Ast })" => Delete(a)
case q"$pack.Returning.apply(${ a: Ast }, ${ b: Ident }, ${ c: Ast })" => Returning(a, b, c)
case q"$pack.Foreach.apply(${ a: Ast }, ${ b: Ident }, ${ c: Ast })" => Foreach(a, b, c)
case q"$pack.Foreach.apply(${ a: Ast }, ${ b: Ident }, ${ c: Ast })" => Foreach(a, b, c)
}

implicit val assignmentUnliftable: Unliftable[Assignment] = Unliftable[Assignment] {
Expand Down

0 comments on commit ddd201f

Please sign in to comment.