wrapper: extract the method to generate a command for groonga executing