[Ur] Multiple joins with an outer join

Athene Noctua steenuil.owl at gmail.com
Mon Jul 3 14:58:41 EDT 2017


Hi,

I'm having trouble with a query using multiple joins, one of which is an
outer join:

SELECT * FROM posts
LEFT OUTER JOIN post_files ON post_files.Post = posts.Key
JOIN files ON post_files.File = files.Key

I think the type system assumes that posts_files.File will exist even
though a post might not have any associated files, and end ups with this:

Can't resolve type class instance
       Class constraint:
{Post_files :
  {File : nullify string string,
    Post : nullify int (option int)}}
Reduced to unresolvable:
{File : nullify string string,
  Post : nullify int (option int)}

Is this query resolvable in some way?

Cheers.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.impredicative.com/pipermail/ur/attachments/20170703/2763eb14/attachment.html>


More information about the Ur mailing list