encode uuids for prepared queries