Flutter: Order the results

Orders the result with the specified column.

Parameters

Examples

With `select()`

final data = await supabase
  .from('instruments')
  .select('id, name')
  .order('id', ascending: false);

On a referenced table

final data = await supabase
    .from('orchestral_sections')
    .select('''
      name,
      instruments (
        name
      )
    ''')
    .order('name', referencedTable: 'instruments', ascending: false);

Order parent table by a referenced table

final data = await supabase
    .from('instruments')
    .select('''
      name,
      section:orchestral_sections (
        name
      )
    ''')
    .order('section(name)', ascending: true)