refactor from EsssesLib-q todo: * [ ] rebuild to use SQLx / deadpool * [ ] native methods instead of closures