diff ( r1: Record , r2: Record ) { Object }

Creates a diff of two records. The returned object will have a size-property with the number of differences. A property called result will have properties for all mismatching attributes where the value is an object with a pair of properties (value1 and value2).

Parameters
Name Type Description
r1 Record
r2 Record

importRecords ( model: Object, resource: String)

Import a set of records from an application resource

Parameters
Name Type Description
model Object
resource String

map ( list: Object[], key: String) { Map }

Indexes an array of Objects or Records given a key

Parameters
Name Type Description
list Object[]
key String

synchronize ( options: Map) { Map }

Synchronize a set of Records to a Model. This will ensure that the passed in records are persisted in the Model based on what is considered the primary key. This operation may result in the creation, deletion and update of records. If a database transaction is not already in scope one will be created and committed, but if a transaction is present no commit will be issued by this function.

Parameters
Name Type Description
options Map
Properties
Name Type Description
model String
key String
delete Boolean
records Array