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

Read operations:

  • getTagByComic(comicId): Promise - Retrieves the tag assigned to a comic. Experimental.
  • getComicsByTag(tagId): Promise<Comic[]> - Retrieves all comics associated with a tag. Experimental.
  • getComicTag(comicId): Promise<ComicTag | null> - Reads a single ComicTag by comicId.
  • getComicTags(): Promise<ComicTag[]> - Reads all ComicTags.

Hierarchy

  • Dao
    • ComicTagDao

Constructors

  • Parameters

    • db: Knex<any, any[]>

    Returns ComicTagDao

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

  • Experimental

    Retrieves all comics associated with a tag.

    Parameters

    • tagId: string

      The ID of the tag.

    Returns Promise<Comic[]>

    Comic[].

  • Reads a single ComicTag by comicId.

    Parameters

    • comicId: string

      The ID of the comic.

    Returns Promise<null | ComicTag>

    ComicTag or null if comicId does not exist.

  • Reads all ComicTags.

    Returns Promise<ComicTag[]>

    ComicTag[]

  • Experimental

    Retrieves the tag assigned to a comic.

    Parameters

    • comicId: string

      The ID of the comic.

    Returns Promise<Tag>

    TagModel or undefined.