Class: DataMapper

DataMapper

Class that serializes a Schema into a normalized object.

Constructor

new DataMapper()

Source:

Methods

serialize(query, schema) → {Array.<Object>}

Serialize the query into the an array of objects, as defined by schema.
Parameters:
Name Type Description
query Array.<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.
Source:
Returns:
An array of objects that is normalized.
Type
Array.<Object>