File tree Expand file tree Collapse file tree 4 files changed +11
-11
lines changed
Expand file tree Collapse file tree 4 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ var SamplingMessageView = require('../sampling-message');
77var MongoDBCollection = require ( '../models/mongodb-collection' ) ;
88var SampledSchema = require ( '../models/sampled-schema' ) ;
99var app = require ( 'ampersand-app' ) ;
10-
1110var $ = require ( 'jquery' ) ;
11+ var _ = require ( 'lodash' ) ;
1212var debug = require ( 'debug' ) ( 'scout:home:collection' ) ;
1313
1414require ( 'bootstrap/js/modal' ) ;
@@ -102,9 +102,9 @@ var MongoDBCollectionView = View.extend({
102102 this . schema . ns = this . model . _id = ns ;
103103 debug ( 'updating namespace to `%s`' , ns ) ;
104104 this . schema . reset ( ) ;
105- this . schema . fetch ( {
105+ this . schema . fetch ( _ . assign ( { } , app . volatileQueryOptions . serialize ( ) , {
106106 message : 'Analyzing documents...'
107- } ) ;
107+ } ) ) ;
108108 this . model . fetch ( ) ;
109109 } ,
110110 onQueryChanged : function ( ) {
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ var Query = require('mongodb-language-model').Query;
66var DEFAULT_SORT = {
77 $natural : - 1
88} ;
9- var DEFAULT_LIMIT = 100 ;
9+ var DEFAULT_SIZE = 100 ;
1010var DEFAULT_SKIP = 0 ;
1111
1212var getDefaultQuery = function ( ) {
@@ -32,9 +32,9 @@ module.exports = Model.extend({
3232 return DEFAULT_SORT ;
3333 }
3434 } ,
35- limit : {
35+ size : {
3636 type : 'number' ,
37- default : DEFAULT_LIMIT
37+ default : DEFAULT_SIZE
3838 } ,
3939 skip : {
4040 type : 'number' ,
@@ -59,7 +59,7 @@ module.exports = Model.extend({
5959 this . set ( {
6060 query : getDefaultQuery ( ) ,
6161 sort : DEFAULT_SORT ,
62- limit : DEFAULT_LIMIT ,
62+ size : DEFAULT_SIZE ,
6363 skip : DEFAULT_SKIP
6464 } ) ;
6565 this . trigger ( 'reset' , this ) ;
Original file line number Diff line number Diff line change @@ -64,11 +64,11 @@ module.exports = Schema.extend({
6464 * Take another sample on top of what you currently have.
6565 *
6666 * @example
67- * schema.fetch({limit : 100});
67+ * schema.fetch({size : 100});
6868 * // schema.documents.length is now 100
69- * schema.more({limit : 100});
69+ * schema.more({size : 100});
7070 * // schema.documents.length is now 200
71- * schema.more({limit : 10});
71+ * schema.more({size : 10});
7272 * // schema.documents.length is now 210
7373 * @param {Object } options - Passthrough options.
7474 */
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ var SamplingMessageView = View.extend({
4444 is_sample : {
4545 deps : [ 'schema_sample_size' ] ,
4646 fn : function ( ) {
47- return this . schema_sample_size === app . queryOptions . limit ;
47+ return this . schema_sample_size === app . queryOptions . size ;
4848 }
4949 } ,
5050 sample_size_message : {
You can’t perform that action at this time.
0 commit comments