Handles all interactions with the comics-db 'events' table.

Read operations:

  • getEvent(eventId): Promise - Reads a single Event by ID.
  • getEvents(): Promise - Reads all Events.

Hierarchy

  • Dao
    • EventsDao

Constructors

Properties

Accessors

Methods

Constructors

  • Parameters

    • db: Knex<any, any[]>

    Returns EventsDao

Properties

db: Knex<any, any[]>

Accessors

  • get primaryKey(): string
  • The primary key of the table as defined in the database.

    Returns string

  • get tableName(): string
  • The name of the table as defined in the database.

    Returns string

Methods

  • Reads a single Event by ID.

    Parameters

    • eventId: string

      The ID of the event.

    Returns Promise<null | Event>

    Event or null if eventId does not exist.

  • Reads all Events.

    Returns Promise<Event[]>

    Event[]