-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Almost a complete rewrite. Adds much more flexibility including supp… #4
Conversation
…rt for all mongo index options and multi-key indexes.
Moved serverIndex.js to server only
…d of determining invalidKeys.
set ecmascript version to 0.3.0 (latest).
Added c2_compat property to automatically create collection2 compatible index names when true. Updated README to reflect the compatibility change Updated package.js to add new indexData.js file
type:-1 | ||
} | ||
}, | ||
author: {cccccccblegetujrrtbgfrcncllvketghefdehvhiuln |
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.
what's that? :)
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.
looks like a yubikey OTP
cccccchcdhvtiklejrnuujjbtedbbnllktvgigvtnfrr
:)
At this point, does it even matter? It might have been a typo. I can't say for sure and I don't remember (it was 6 months ago). I can't get spacejam to work on my development machine to fix the error that is causing the problems and the spacejam group is completely unhelpful as to identifying a cause. (It flat out won't start on my laptop but on our CI servers it periodically hangs for no reason.) I'll just continue to use this update myself and I'll close this merge request. |
I need to find a way to setup composite indexes, and found out your PR. I was just curious of what that mysterious line was :) |
No idea. From: Grégory Horion notifications@github.com I need to find a way to setup composite indexes, and found out your PR. I was just curious of what that mysterious line was :) — |
This is almost a complete rewrite. See the docs and you can readily discern what's different. (Maybe I should add a migration section to the README?)
In short, this adds support for all mongo indexes and all their options, including compound indexes (thus, closing bugs #1 and #3).
Instead of everything being in the schema, the column-specific options are there. You just need to call
collection.attachIndex(name, options)
to actually create the index (assuming the schema is already attached). Options are the full options to mongo.CreateIndex. Further, if you call attachIndex before you call attachSchema, the index will be queued up until the schema is attached. There is also a rebuild option to rebuild an index that has changed, rather than separately dropping and re-adding it.All the tests work, with slight modifications to accommodate the syntax change in the schema and calling the new attachSchema method.
A previous build has accidental test failures caused by the previous version and c2's reliance on using indexes with the form c2_fieldName for all indexes. The tests were updated to use this form (and thus pass), but the method used by C2 for picking out invalid keys will not work with composite indexes.
Truly integrating this requires work on c2 to improve the invalidKeys handling, and thus, I'd appreciate some feedback for how you would like to generalize that aspect of c2.