add function to qgis expression for db query