haxetink / tink_sql

SQL embedded into Haxe
MIT License
54 stars 17 forks source link

Select tables #109

Open benmerckx opened 4 years ago

benmerckx commented 4 years ago

In a query with some left joins I'd like to be able to pick which tables to nest in the response (in this case the left ones). While I can manually pick every field in the select macro it would be be easier to be able to specify something like this (in my specific case in combination with #108 it would allow me to select distinct results of db.table I believe):

db.table.leftJoin(db.table2).on(...).select({table: db.table}) => Selected<_, _, {table: Table}, _>