Skip to content

Conversation

@spiegela
Copy link

I know it's been a while since this program has been updated, and I'm not sure if it's still in use. I've found it very useful for working with a legacy schema that doesn't fit into other tool requirements. Thanks for making it available!

I've added join support for a project I'm working on.

I've also added the ability to call functions on functions for some weird SQL like:

SELECT
  CONCAT('[',GROUP_CONCAT(comment.id),']')
FROM posts
JOIN  comments AS comment
  ON comments.post_id = posts.id
GROUP BY posts.id

@spiegela spiegela changed the title Add join support Add join support and calling functions on functions Sep 13, 2014
devinus pushed a commit that referenced this pull request Aug 13, 2015
Add join support and calling functions on functions
@devinus devinus merged commit b33058b into devinus:master Aug 13, 2015
@ptrf
Copy link

ptrf commented Nov 11, 2015

This PR fails with the following test case:

{<<"SELECT * FROM outer(var1 := 1, var2 := inner(innervar := 2))">>,
 ?_safe_test({select,'*',{from,{call,outer,[{var1, 1},{var2,{call,inner,[{innervar, 2}]}}]}}})
}

@spiegela
Copy link
Author

@ptrf Can you post the stack trace of the failure to gist or somewhere?

@ptrf
Copy link

ptrf commented Nov 16, 2015

@spiegela Here you go: https://gist.github.com/ptrf/b6179a092f17a8d3c5a1

This is from running make test in the current master HEAD with the additional test case written out.

Do also read the 3 commits and commit messages attached in PR #6 that I submitted to fix this issue.

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

Successfully merging this pull request may close these issues.

3 participants