Skip to content
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

Closed
wants to merge 8 commits into from

Conversation

dpankros
Copy link

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.

…rt for all mongo index options and multi-key indexes.
@dpankros dpankros closed this Feb 11, 2016
David M. Pankros added 3 commits February 11, 2016 13:27
@dpankros dpankros reopened this Feb 11, 2016
David M. Pankros added 4 commits February 11, 2016 17:16
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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's that? :)

Copy link

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

:)

@dpankros
Copy link
Author

dpankros commented Aug 3, 2016

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.

@dpankros dpankros closed this Aug 3, 2016
@gregory
Copy link

gregory commented Aug 4, 2016

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 :)

@dpankros
Copy link
Author

dpankros commented Aug 4, 2016

No idea.

From: Grégory Horion notifications@github.com
Reply: aldeed/meteor-schema-index reply@reply.github.com
Date: August 4, 2016 at 2:51:52 PM
To: aldeed/meteor-schema-index meteor-schema-index@noreply.github.com
Cc: David Pankros dpankros@yahoo.com, State change state_change@noreply.github.com
Subject:  Re: [aldeed/meteor-schema-index] Almost a complete rewrite. Adds much more flexibility including supp… (#4)

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 :)


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or mute the thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants