Open mmagyar opened 8 years ago
Version: 0.8.0 Module: quill-async
Pattern matching of Option (Some/None) is not supported inside a quotation, it will throw a compile time error of failed ast parsing.
example code:
quote { query[UserGroupJoin].withFilter { case (u) => u.userId == lift(user.id) } .leftJoin(query[AccessControlListGroup]) .on((userGroup, acl) => userGroup.userGroup == acl.userGroup) .withFilter { case (u) => u._2 match { case Some(acl) => acl.resource == lift(resource.id) && acl.enabled case None => lift(!resource.blockByDefault) } } }
@getquill/maintainers
solution should be generic to any pattern matching by translating it to sql case/when
Version: 0.8.0 Module: quill-async
Pattern matching of Option (Some/None) is not supported inside a quotation, it will throw a compile time error of failed ast parsing.
example code:
@getquill/maintainers