Closed Borgquite closed 3 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 94%. Comparing base (
c5e7fe7
) to head (372251f
). Report is 4 commits behind head on main.
I'm having a go at this, but at the moment I'm struggling to get HQRM tests to pass. Is it possible that it's not permitted to use a String[] as a Key variable (quite likely?)
If that's the case, perhaps what is needed is a new Key variable called something like 'Id' or 'Name' - and the existing Keys (InstanceName, SetFilePath, GetFilePath, TestFilePath) could be removed as Keys. That might remove some of the compile-time protections against idempotency but would open up the opportunity to reuse a script file multiple times with just the variables needing changing.
@Borgquite I believe you are correct, Key properties need to be 'simple'. I can't find where it's documented though.
Why would not adding another Key property like you mention not work?
Would there be a situation where the database name would be a Key property but used as a variable? Or would the same scripts be reused against the same database?
As discussed on the #dsc channel, I'll redo this patch with a new Key parameter which should allow us to do this. It will be a breaking change but we've agreed that is pretty unavoidable in the circumstances.
Opened new pull request at #2043
Pull Request (PR) description
Add 'Variable' as a key to SqlScript, SqlScriptQuery resources to allow reuse of a script with different variables
This Pull Request (PR) fixes the following issues
Task list
This change is