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

Create operations:

  • createShop(shop): Promise - Creates a single Shop and reads the result. Experimental. Read operations:
  • getShop(shopId): Promise - Reads a single Shop by ID.
  • getShops(): Promise - Reads all Shops.

Hierarchy

  • Dao
    • ShopsDao

Constructors

Properties

Accessors

Methods

Constructors

  • Parameters

    • db: Knex<any, any[]>

    Returns ShopsDao

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

    Creates a single Shop and reads the result.

    Parameters

    Returns Promise<Shop>

    The Shop that was created.

  • Reads a single Shop by ID.

    Parameters

    • shopId: string

      The ID of the shop.

    Returns Promise<null | Shop>

    Shop or null if shopId does not exist.

  • Reads all Shops.

    Returns Promise<Shop[]>

    Shop[].