ship-hold
ship-hold copied to clipboard
[Feature request] create a function on select builders to output with an alias
Feature request:
Select builders are often used in sub query with aliases.
It would be a nice syntax addition if instead of using an object we could output the builder with a alias directly thanks to an as
method
//currently
sh.select().from({
as:'foo',
value:sh.select().from('users').where('age','>',42).noop()
});
could be written:
sh.select().from(sh.select().from('users').where('age','>',42).as('foo'));
I would love to see this feature implemented.
That's a good one to start, I can help you to make a pull request if you want