Options
All
  • Public
  • Public/Protected
  • All
Menu

Data access object Dao class for Tax model entity

see

Dao

Hierarchy

  • TaxDao

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

  • Create a Tax data access object.

    Returns TaxDao

Properties

Private _pool

_pool: Pool

Methods

create

  • create(tax: Tax): Promise<Tax>
  • Creates a new record in database provided by given Tax entity.

    Parameters

    • tax: Tax

      A new Tax entity to create in database.

    Returns Promise<Tax>

    a Tax entity of the newly created record.

delete

  • delete(tax: Tax): Promise<Tax>
  • Deletes tax record in database for given Tax entity, record is acquired by id field in given Tax entity.

    Parameters

    • tax: Tax

      Tax entity to be deleted from database.

    Returns Promise<Tax>

    the deleted Tax entity, null if no record is found.

read

  • read(id: number): Promise<Tax>
  • Queries for a tax record with a given id.

    Parameters

    • id: number

      Unique identifier for a tax record to acquire.

    Returns Promise<Tax>

    a Tax model entity for resultant record, null if none found.

readAll

  • readAll(): Promise<Tax[]>
  • Queries for all forms of taxes stored in database.

    Returns Promise<Tax[]>

    A collection of Tax model entities.

update

  • update(tax: Tax, params: TaxParams): Promise<Tax>
  • Updates record attributes to values specified in params, record is acquired by id field in given Tax entity.

    Parameters

    • tax: Tax

      Tax entity to be updated.

    • params: TaxParams

      JSON object with specified fields to be updated with new values.

    Returns Promise<Tax>

    the updated Tax entity, null if no record is found.

Generated using TypeDoc