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

Read operations:

  • getGradeByComic(comicId): Promise - Reads a single Grading by comic ID.
  • getGradeByCert(certId): Promise - Reads a single Grading by certificate ID.
  • getGrades(): Promise - Reads all Gradings.

Hierarchy

  • Dao
    • GradingDao

Constructors

  • Parameters

    • db: Knex<any, any[]>

    Returns GradingDao

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 Grading by certificate ID.

    Parameters

    • certId: string

      The ID of the grading certificate.

    Returns Promise<Grading>

    Grading or undefined if certId does not exist.

  • Reads a single Grading by comic ID.

    Parameters

    • comicId: string

      The ID of the comic.

    Returns Promise<null | Grading>

    Grading or null if comicId does not exist.

  • Reads all Gradings.

    Returns Promise<Grading[]>

    Grading[]