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

Read operations:

  • getTag(tagId): Promise - Reads a single Tag by tag ID.
  • getTags(): Promise - Reads all Tags.

Hierarchy

  • Dao
    • TagsDao

Constructors

Properties

Accessors

Methods

Constructors

  • Parameters

    • db: Knex<any, any[]>

    Returns TagsDao

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 Tag by tag ID.

    Parameters

    • tagId: string

      The ID of the Tag.

    Returns Promise<null | Tag>

    Tag or null if tagId does not exist.

  • Reads all Tags.

    Returns Promise<Tag[]>

    Tag[]