honeysql

Discussion of https://github.com/seancorfield/honeysql :slightly_smiling_face:
2021-03-17T00:29:12.057300Z

Interesting, I finally tried to run the entire query with that last bit, and now I get this:

ERROR: subquery in FROM must have an alias
  Hint: For example, FROM (SELECT ...) [AS] foo.
  Position: 1092

2021-03-17T00:36:28.057700Z

So I need to figure out how to generate that alias for the select....

seancorfield 2021-03-17T00:40:05.058Z

I told you how to do that just above.

seancorfield 2021-03-17T00:40:41.058500Z

^ @dcj did you not see my suggestion?

2021-03-17T00:41:22.059200Z

yes, wrapping the entire thing in an outer select :*

2021-03-17T00:41:25.059400Z

?

seancorfield 2021-03-17T00:45:01.059800Z

No, the alias in the from clause.

2021-03-17T00:45:14.060100Z

trying that now,

seancorfield 2021-03-17T00:45:43.060800Z

(from [ (some subquery) :alias ]) => FROM (some subquery) AS alias

seancorfield 2021-03-17T00:46:12.062Z

So it’s just a matter of how much of your query needs to go into that (some subquery) piece.

2021-03-17T00:46:21.062200Z

Seem to recall issue with subsequent inner joins not being inside the enveloping FROM