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

Read operations:

  • getCreator(creatorId): Promise - Reads a single Creator by ID.
  • getCreators(): Promise<Creator[]> - Reads all Creators.

Hierarchy

  • Dao
    • CreatorsDao

Constructors

Properties

Accessors

Methods

Constructors

  • Parameters

    • db: Knex<any, any[]>

    Returns CreatorsDao

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

    Parameters

    • creatorId: string

      The ID of the Creator.

    Returns Promise<null | Creator>

    Creator or null if creatorId does not exist.

  • Reads all Creators.

    Returns Promise<Creator[]>

    Creator[]