-
Notifications
You must be signed in to change notification settings - Fork 1
OSRecord
Arthur Guiot edited this page Mar 3, 2019
·
2 revisions
class OSRecord {
// methods
constructor(data) {}
// Getters
get keys() {}
get values() {}
// Internal functions
main(key) {}
secondary(key) {}
}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 recordOSRecord has a simple data property to access the data originally given.
record.data["myproperty"]
// or
record.data.myproperty