-
-
Notifications
You must be signed in to change notification settings - Fork 58
Fir for Add sparse options for index #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 2 commits
79f2fdc
f6e47e7
ce222c6
7e79705
7b0f4ad
f71fdc3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,7 +122,7 @@ vows.describe('mongodb').addBatch({ | |
return this.callback(err); | ||
} | ||
|
||
db.addIndex('event', 'event_title', 'title', false, this.callback); | ||
db.addIndex('event', { name: 'event_title', columns: 'title', unique: false, sparse: true }, this.callback); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here |
||
}.bind(this)); | ||
}, | ||
|
||
|
@@ -230,7 +230,7 @@ vows.describe('mongodb').addBatch({ | |
return this.callback(err); | ||
} | ||
|
||
db.addIndex('event', 'event_title', 'title', false, function(err, data) { | ||
db.addIndex('event', { name: 'event_title', columns: 'title', unique: false }, function(err, data) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Last thing missing here: You have deleted the old tests, but to actually cover the old and new functionality, the old and the new tests have to coexist, rather than one gets rewritten. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But these are internal calls made within the test case hence I changed them to use the updates style. I have also added a separate test case for addIndex for the previous style. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, this wasn't clear from the diff. Please don't adjust tests in the future and instead add directly new ones instead :) |
||
|
||
if(err) { | ||
return this.callback(err); | ||
|
@@ -299,7 +299,7 @@ vows.describe('mongodb').addBatch({ | |
return this.callback(err); | ||
} | ||
|
||
db.addIndex('event', 'event_title', 'title', false, function(err, data) { | ||
db.addIndex('event', { name: 'event_title', columns: 'title', unique: false }, function(err, data) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here |
||
|
||
if(err) { | ||
return this.callback(err); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also adjust the tags properly.