blackburn

Drop-in serializer support for Express/Connect Node apps.

Raw Adapter Defined in lib/adapters/raw.js

The raw adapter is for when you aren't using an ORM framework. It assumes you are working with POJOs rather than model instances.

typeForRecord (recordoptions)

Given a POJO model, return the type from the options supplied.

Arguments

Returns

(String)

idForRecord (record)

Given a POJO model, return the id based on the idAttribute.

Arguments

Returns

(Number,String)

id of the supplied record

attributeFromRecord (recordattributeName)

Fetch a simple attribute from the record.

Arguments

Returns

()

relationshipFromRecord (recordrelationshipNamerelationshipConfig)

Given a record, the relationship name, and the relationship config, return the data for a given record, which could be the ids, an id, the records, or a specific record.

Arguments

Returns

(Array.<Object>,Object,String,Number,Array.<String>,Array.<Number>)

related data

, options

, relationshipConfig, options

, relationshipConfig, options

, relationshipConfig, options

, relationshipConfig, options