[#174,refactor][s]: rename currentRecords to records on Dataset.
This commit is contained in:
@@ -41,13 +41,13 @@ dataset.fetch();
|
||||
|
||||
// we will now have the following (and more) set up - see below for details
|
||||
dataset.fields // collection of Fields (columns) for this Dataset
|
||||
dataset.currentRecords // collection of Records resulting from latest query
|
||||
dataset.records // collection of Records resulting from latest query
|
||||
dataset.docCount // total number of Records in the last query
|
||||
{% endhighlight %}
|
||||
|
||||
### Key Attributes
|
||||
|
||||
* currentRecords: a collection of `Record`s currently loaded for viewing
|
||||
* records: a collection of `Record`s currently loaded for viewing
|
||||
(updated by calling query method) - note that this need <strong>not</strong>
|
||||
be all the records in the dataset (for example, you may have connected to a
|
||||
source where the complete dataset contains a million records but you have
|
||||
|
||||
@@ -47,7 +47,7 @@ Here's a summary of the main objects and their events:
|
||||
* Standard Backbone events for changes to attributes (note that this will **not** include changes to records)
|
||||
* *query:start / query:end* called at start and completion of a query
|
||||
|
||||
* Dataset.currentRecords: Backbone.Collection of "current" records (i.e. those resulting from latest query) with standard Backbone set of events: *add, reset, remove*
|
||||
* Dataset.records: Backbone.Collection of "current" records (i.e. those resulting from latest query) with standard Backbone set of events: *add, reset, remove*
|
||||
|
||||
* Dataset.queryState: queryState is a Query object with standard Backbone Model set of events
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ The basic thing we want to do with Datasets is query and filter them. This is ve
|
||||
{% include tutorial-basics-ex-2.js %}
|
||||
{% endhighlight %}
|
||||
|
||||
This results in the following. Note how recordCount is now 3 (the total number of records matched by the query) but that currentRecords only contains 2 records as we restricted number of returned records using the size attribute.
|
||||
This results in the following. Note how recordCount is now 3 (the total number of records matched by the query) but that records only contains 2 records as we restricted number of returned records using the size attribute.
|
||||
|
||||
<div class="ex-2 well"> </div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user