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

Read operations:

  • getCreatorsByComic(comicId): Promise<Creator[]> - Retrieves all creators for a comic. Experimental.
  • getCreatorComics(creatorId): Promise<Comic[]> - Retrieves all comics by a creator. Experimental.
  • getComicCreator(comicId): Promise<ComicCreator | null> - Reads a single ComicCreator by comicId.
  • getComicCreators(): Promise<ComicCreator[]> - Reads all ComicCreators.

Hierarchy

  • Dao
    • ComicCreatorDao

Constructors

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 ComicCreator by comicId.

    Parameters

    • comicId: string

      The ID of the comic.

    Returns Promise<null | ComicCreator>

    ComicCreator or null if comicId does not exist.

  • Experimental

    Retrieves all comics by a creator.

    Parameters

    • creatorId: string

      The ID of the creator.

    Returns Promise<Comic[]>

    Comic[].

  • Experimental

    Retrieves all creators for a comic.

    Parameters

    • comicId: string

      The ID of the comic.

    Returns Promise<Creator[]>

    CreatorModel[].