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

Read operations:

  • getConvention(conventionId): Promise - Reads a single Convention by ID.
  • getConventions(): Promise<Convention[]> - Reads all Conventions.

Hierarchy

  • Dao
    • ConventionsDao

Constructors

Properties

Accessors

Methods

Constructors

  • Parameters

    • db: Knex<any, any[]>

    Returns ConventionsDao

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 Convention by ID.

    Parameters

    • conventionId: string

      The ID of the Convention.

    Returns Promise<null | Convention>

    Convention or null if conventionId does not exist.