Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DataMapper

Class that serializes a Schema instance in to a normalized document (a series of Table-decorated Entities).

Hierarchy

  • DataMapper

Index

Methods

Methods

serialize

  • serialize<T>(query: object[], schema: Schema): T[]
  • Serialize the query into the an array of objects, as defined by schema.

    Type parameters

    • T

    Parameters

    • query: object[]

      A set of query results, which is an array of objects containing keys as properties and values from a database query.

    • schema: Schema

      The Schema instance describing how to serialize the query.

    Returns T[]

    A normalized document (an array of T instances).

Generated using TypeDoc