data = [{'value': '', 'text': '全部'}] try: async with get_sor_context(request._run_ns, 'pipeline') as sor: rows = await sor.sqlExe('select id as value, name as text from distributors order by name', {}) data.extend(list(rows)) except Exception as e: debug('error: ' + str(e)) return json.dumps(data, ensure_ascii=False)