busao
    Preparing search index...

    Function updateSeatCount

    • Updates the seat count of a trip tale.

      Parameters

      • database: BunSQLiteDatabase

        The project's database.

      • trip: TripDirection

        The direction associated with the table that will be updated.

      • newTotalSeats: number

        How many seats will the table have now.

      • date: string

        The date of the trips in YYYY-MM-DD format..

      Returns Promise<{ id: number; oneWaySeats: number; returnSeats: number }>

      The configuration as updated in the database.

      If the number goes up, waitlist candidates are promoted from oldest to newest.

      If the number goes down, confirmed candidates are demoted from newest to oldest.

      Name is the tie-breaker criteria.

      DatabaseSelectionError Thrown in case the "configuration" table has no rows.