Use the correct escaping function for the database type.