Update docs and CHANGELOG with objectForPrimaryKey
This commit is contained in:
parent
cd0bb079b7
commit
3c657c3bbf
|
@ -5,6 +5,7 @@ x.x.x Release notes (yyyy-MM-dd)
|
|||
|
||||
### Enhancements
|
||||
* Added `isValid()` method to `List` and `Results` to check for deleleted or invalidated objects
|
||||
* Added `objectForPrimaryKey(type, key)` method to `Realm`
|
||||
|
||||
### Bugfixes
|
||||
* None
|
||||
|
|
|
@ -106,6 +106,16 @@ class Realm {
|
|||
*/
|
||||
objects(type) {}
|
||||
|
||||
/**
|
||||
* Searches for a Realm object by its primary key.
|
||||
* @param {Realm~ObjectType} type - The type of Realm object to search for.
|
||||
* @param {number|string} key - The primary key value of the object to search for.
|
||||
* @throws {Error} If type passed into this method is invalid or if the object type did
|
||||
* not have a `primaryKey` specified in its {@link Realm~ObjectSchema ObjectSchema}.
|
||||
* @returns {Realm.Object|undefined} if no object is found.
|
||||
*/
|
||||
objectForPrimaryKey(type, key) {}
|
||||
|
||||
/**
|
||||
* Add a listener `callback` for the specified event `name`.
|
||||
* @param {string} name - The name of event that should cause the callback to be called.
|
||||
|
|
Loading…
Reference in New Issue