Introduce sqlx package for generic SQL functions, fixes IM-12