Dart Reference v2.0

Order the results

Orders the result with the specified column.

Parameters
    column
    REQUIRED
    String

    The column to order by.

    ascending
    Optional
    bool

    Whether to order in ascending order. Default is false.

    nullsFirst
    Optional
    bool

    Whether to order nulls first. Default is false.

    referencedTable
    Optional
    String

    Specify the referenced table when ordering by a column in an embedded resource.


final data = await supabase
  .from('cities')
  .select('name, country_id')
  .order('id', ascending: true);