-
Notifications
You must be signed in to change notification settings - Fork 462
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 sqlcmd scripts #978
Comments
Whilst this sounds cool and nifty, I'm not sure where the need is for this and it's not something I have the time to concentrate on - I'd happily accept PRs for improvements, but this feels like a low priority for me at the moment |
@dhensby totally understood... also, given the need to work, potentially with multiple databases and queries with I was just reading through the generated file, and thought it might not be too much work to support such scripts. Mainly from db export/backup and from db projects in visual studio. (aside: migrating from a vs sql project to a version-script solution, so starting point is a set of these scripts). |
Was thinking it would be really cool to support the additional features of
sqlcmd
/osql
in a command parameter...sql.command(script, [commandVars])
For example:
/\r?\n\:setvar\s+(\w+)\s+([^\r\n]+)\s*\r?\n/g
;:on error exit
, always error on exit/\r?\nGO;?\r?\n/g
and injecting the script variables...__IsSqlCmdEnabled = True
for all commands.PRINT
statements toSELECT PRINT=...
- maybe use an emitter, or console.log the statements based on config?Object.assign({}, detectedVars, commandVars)
I'm not entirely sure what else sqlcmd does in practice, but could be a decent idea.
The text was updated successfully, but these errors were encountered: