limit()

用指定的 count 来限制结果.

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

Parameters

  • count required number

    要限制的最大行数.
  • __namedParameters required object

    No description provided.
      Properties
    • foreignTable required undefined | string

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

    </li>

    </ul>

    Examples

    使用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 ""