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

Include of scripts with parameters #34

Closed
piotr-wilczynski opened this issue Sep 28, 2016 · 0 comments
Closed

Include of scripts with parameters #34

piotr-wilczynski opened this issue Sep 28, 2016 · 0 comments
Assignees
Milestone

Comments

@piotr-wilczynski
Copy link
Contributor

piotr-wilczynski commented Sep 28, 2016

It is very often that projects are re-using scripts with different parameter values. Add possibility to pass arguments in INCLUDE action.

Current state

Main script:

DEFINE name 'foo'
DEFINE pass 'p@$$'
RUN create-user.cqsm

Script create-user.cqsm:

CREATE USER $name $pass 

Proposed solution

Main script:

RUN create-user.cqsm name=['foo'] pass='p@$$'

Script create-user.cqsm:

REQUIRE [name, pass]    # throws error when name or pass is not defined

CREATE USER $name $pass 

Additional requirements:

  • Create new command (or add handler on the level of ANTLR handlers): REQUIRE - if definition of given name isn't currently accessible, throw an error.
  • This feature depends on New syntax for arguments #185.
@pun-ky pun-ky mentioned this issue Jul 26, 2017
@mjedraszczyk mjedraszczyk changed the title Include with parameters Include script Jul 2, 2019
@mjedraszczyk mjedraszczyk changed the title Include script Include with parameters Jul 2, 2019
@mjedraszczyk mjedraszczyk changed the title Include with parameters Include of scripts with parameters Jul 4, 2019
@mjedraszczyk mjedraszczyk self-assigned this Sep 10, 2019
@mjedraszczyk mjedraszczyk added this to the 5.0.0 milestone Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants