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

Read operations:

  • getBoxForComic(comicId): Promise - Retrieves the Box that a Comic is stored in. Deprecated.
  • getComicsInBox(boxId): Promise<Comic[]> - Retrieves a List of Comics that are in the given Box. Deprecated.
  • getComicBox(comicId): Promise<ComicBox | null> - Reads a single ComicBox by comicId.
  • getComicBoxes(): Promise<ComicBox[]> - Reads all ComicBoxes.

Hierarchy

  • Dao
    • ComicBoxDao

Constructors

  • Parameters

    • db: Knex<any, any[]>

    Returns ComicBoxDao

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

  • Retrieves the Box that a Comic is stored in.

    Parameters

    • comicId: string

      The ID of the comic to retrieve the Box for.

    Returns Promise<Box>

    Box or null.

    Use getComicBox

  • Reads a single ComicBox by comicId.

    Parameters

    • comicId: string

      The ID of the comic.

    Returns Promise<null | ComicBox>

    ComicBox or null if comicId does not exist.

  • Reads all ComicBoxes.

    Returns Promise<ComicBox[]>

    ComicBox[]

  • Retrieves a List of Comics that are in the given Box.

    Parameters

    • boxId: string

      The ID of the Box to retrieve the Comics.

    Returns Promise<Comic[]>

    ComicModel[]

    Use getComicBoxes