Summary: This diff is primarily cosmetic, just pushing code around to make the API more intuitive. Most importantly, DataSource was split into DataSource and DataSourceView classes, the latter being accessible through `datasource.view`. The benefit of this is two fold: 1. Conceptually it is much clearer now which operations operate on the _source_ records, and which ones on the derived _view_. 2. This will make it easier in the future to support multiple views to be based on a single data source. This refactoring also nicely found 2 cases where datasource logic and view logic were mixed. The only semantic change in this diff is that both DataSource and DataSourceView are now iterable, so that one can do a `for (const record of ds)` / `for (const record of ds.view)` Reviewed By: nikoant Differential Revision: D26976838 fbshipit-source-id: 3726e92b3c6ee3417dc66cbbe6e288797eecf70e
12 KiB
12 KiB