You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Flutter中Supabase的match函数查询报错求助

问题解决方法

错误原因

order 是PostgREST的保留关键字,直接将其作为字段名进行匹配查询时,会被系统误识别为排序指令,从而引发解析错误。

解决方案

通过双引号包裹字段名的方式,明确告诉PostgREST这是一个列名而非关键字,以下两种写法都可行:

方法一:使用match方法时转义字段名

Supabase.instance.client
    .from('delivery')
    .select('location')
    .match({'"order"': 'test'})
    .then((value){print(value);});

方法二:使用eq方法直接指定条件

Supabase.instance.client
    .from('delivery')
    .select('location')
    .eq('"order"', 'test')
    .then((value){print(value);});

内容的提问来源于stack exchange,提问作者mohammadmnyer

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.22 05:05:10