Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for isolated variables would be helpful #261

Open
hoijnet opened this issue Feb 24, 2023 · 1 comment
Open

Support for isolated variables would be helpful #261

hoijnet opened this issue Feb 24, 2023 · 1 comment
Labels

Comments

@hoijnet
Copy link
Contributor

hoijnet commented Feb 24, 2023

Is your feature request related to a problem? Please describe.
Today, generated variables are AFAIK not generated with unique names, which is an advantage in some scenarios. In other scenarios, it is helpful to get isolated variables. Thus, adding a flag to get variables with a cryptographically unique id as a suffix would help make them local

Describe the solution you'd like
Add an optional flag to the WOQL.vars() function to generate unique variable names.

Describe alternatives you've considered
Write a local function in own code for it.

Additional context
Adding the feature request to get a conversation going.

@github-actions github-actions bot added the triage issue to be triage label Feb 24, 2023
@hoijnet
Copy link
Contributor Author

hoijnet commented Feb 24, 2023

A locally scoped variable would thus be created like so:

const [localVariable] = WOQL.localVars("localVariable")

As the vars is bound to take all parameters, it would not look nice to have the last for first one be a boolean for local, probably better to introduce localVars.

@Francesca-Bit Francesca-Bit added planned and removed triage issue to be triage labels Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants