Generic SQL helper functions for TSdbi SQL plugins