Skip to content

OSRecord

Arthur Guiot edited this page Mar 3, 2019 · 2 revisions

Definition

class OSRecord {
    // methods
    constructor(data) {}
    // Getters
    get keys() {}
    get values() {}
    // Internal functions
    main(key) {}
    secondary(key) {}
}

Usage

OSRecord is an object representing a row in your database. It can be modified to keep certain properties or hide data. It's a pretty light object that helps OrionSearch unifying its ecosystem architecture without using native objects for better integration across all the different platforms.

The OSRecord object will mostly be used as a read-only property given by the perform method in OrionSearch. But it can also be created manually for in-memory databases:

const record = new OSRecord({ ... }) // creates the record

Accessing the data

OSRecord has a simple data property to access the data originally given.

record.data["myproperty"]
// or
record.data.myproperty

Clone this wiki locally