limit()

用指定的 count 来限制结果.

const { data, error } = await supabase
  .from('cities')
  .select('name, country_id')
  .limit(1)

参数

  • count required number

    要限制的最大行数.
  • 已命名的参数 required object

      属性
    • foreignTable required undefined | string

      要使用的外部表(用于外部列).

    </li>

    </ul>

    例子

    使用select()

    const { data, error } = await supabase
      .from('cities')
      .select('name, country_id')
      .limit(1)
    

    带有嵌入式资源

    const { data, error } = await supabase
      .from('countries')
      .select('name, cities(name)')
      .eq('name', 'United States')
      .limit(1, { foreignTable: 'cities' })
    

results matching ""

    No results matching ""