smart-on-fhir / cumulus-library

https://docs.smarthealthit.org/cumulus/library/
Apache License 2.0
2 stars 0 forks source link

move db type to jinja environment #224

Closed dogversioning closed 2 months ago

dogversioning commented 2 months ago

It would be useful, in multiple cases, to have the db engine available to sql templates - this would allow us to hide db-specific complexity, either in if else blocks or in separate utility functions.

It would be great if we could get a global jinja environment to handle this. Otherwise, we would want to make sure that this value was always available to be passed into a template function.

dogversioning commented 2 months ago

update: the way environments are defined, vs how we load them with study specific imports, makes this a non-starter without other major breaking changes. But we can pass this data to a jinja environment as part of a global config until the next time we're ready to make breaking changes.

dogversioning commented 2 months ago

Addressed via #226