Why aren't let statements allowed before .commands?

Microsoft

I get the intent of 'do all .command mutations first then queries', but is there any chance you will allow let assignments that themselves need to be used in a complex .command, such as scalar or datable definitions used in a .set.

 

Is $command_results supposed to help this, I can't make that work (for a .set command) either.

 

For example, I want to .set into a datatable, but I can't define it first. :)

 

There are many scenarios for using variables, table defs and such in a .command.you can easily come up with this would be very useful for.

2 Replies

@dudeed - thank you for your comment, this capability is currently blocked due to security issues but is it in our backlog for further investigation 

@Tzvia Gitlin Troyna Thanks for your response, I figured it was for that reason. Hopefully some subset of let can be securely enabled for basic purposes of abstraction in the future.