Summary:
Add support for secondary indices, to allow for cheap lookups, like a set of events for a specific UI element in the events table:
```
#### getAllRecordsByIndex
Usage: `getAllRecordsByIndex({ indexedAttribute: value, indexAttribute2: value2, .... })`
This method allows fast lookups for objects that match specific attributes exactly.
Returns all items matching the specified index query.
Note that the results are unordered, unless
records have not been updated using upsert / update, in that case
insertion order is maintained.
If no index has been specified for this exact keyset in the indexQuery (see options.indices), this method will throw.
Example:
```
```
const ds = createDataSource([eatCookie, drinkCoffee, submitBug], {
key: 'id',
indices: [
['title']
['id', 'title'],
['title', 'done'],
],
});
// Find first element with title === cookie (or undefined)
const todo = ds.getFirstRecordByIndex({
title: 'cookie',
})
// Find all elements where title === cookie, and done === false
const todos = ds.getAllRecordsByIndex({
title: 'cookie',
done: false,
})
```
Reviewed By: antonk52
Differential Revision: D47396435
fbshipit-source-id: 20c4527be83532863b9b07ab20ebf20a80c3c35d
Summary:
This is an automated PR to update the Podfile.lock.
- Make sure that the Podfile.lock contains latest FlipperKit and Flipper pod versions.
- Also make sure that all the dependencies are updated to the latest one.
- This is auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request)
Pull Request resolved: https://github.com/facebook/flipper/pull/4890
Reviewed By: ivanmisuno
Differential Revision: D47091378
Pulled By: passy
fbshipit-source-id: 254b1a6ca737c2ccfa40db3bae147d0db1b1594b
Summary:
This is an automated PR to update the Podfile.lock.
- Make sure that the Podfile.lock contains latest FlipperKit and Flipper pod versions.
- Also make sure that all the dependencies are updated to the latest one.
- This is auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request)
Pull Request resolved: https://github.com/facebook/flipper/pull/4836
Reviewed By: lblasa
Differential Revision: D46756889
Pulled By: passy
fbshipit-source-id: 8151a079e6a80a7bdd729bb836cdfeb6cc331994
Summary:
This is an automated PR to update the Podfile.lock.
- Make sure that the Podfile.lock contains latest FlipperKit and Flipper pod versions.
- Also make sure that all the dependencies are updated to the latest one.
- This is auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request)
Pull Request resolved: https://github.com/facebook/flipper/pull/4826
Reviewed By: lblasa
Differential Revision: D46679156
Pulled By: passy
fbshipit-source-id: 81cf60d16ea7ce2954ce16896f2dec84b11119c2
Summary:
This is an automated PR to update the Podfile.lock.
- Make sure that the Podfile.lock contains latest FlipperKit and Flipper pod versions.
- Also make sure that all the dependencies are updated to the latest one.
- This is auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request)
Pull Request resolved: https://github.com/facebook/flipper/pull/4794
Reviewed By: antonk52
Differential Revision: D46355046
Pulled By: passy
fbshipit-source-id: e676d4c9d8bef0b3ab29bc9e6cb23838b262c5bf
Summary:
This diff has been automatically generated by the inpage editor.
NOTE: If you want to update this diff, go via the preview link inside the static docs section below.
Ensure you are editing the same page that was used to create this diff.
Reviewed By: mweststrate
Differential Revision: D45996048
fbshipit-source-id: a509d9393d2b61ec044cdf1b749b5b6083070ff3
Summary:
This is an automated PR to update the Podfile.lock.
- Make sure that the Podfile.lock contains latest FlipperKit and Flipper pod versions.
- Also make sure that all the dependencies are updated to the latest one.
- This is auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request)
Pull Request resolved: https://github.com/facebook/flipper/pull/4661
Reviewed By: ivanmisuno
Differential Revision: D44995374
Pulled By: passy
fbshipit-source-id: 4c93a3750da5ae9977e62451e0bf7f3717b8c233