Swift: Order the results

Order the query result by column.

Examples

With `select()`

try await supabase
  .from("instruments")
  .select("id, name")
  .order("id", ascending: false)
  .execute()

On a foreign table

  try await supabase
    .from("orchestral_sections")
    .select(
      """
        name,
        instruments (
          name
        )
      """
    )
    .order("name", ascending: false, referencedTable: "instruments")
    .execute()

Order parent table by a referenced table

  try await supabase
    .from("instruments")
    .select(
      """
        name,
        section:orchestral_sections (
          name
        )
      """
    )
    .order("section(name)", ascending: true)