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

Support ignoreCase option #3

Open
parente opened this issue Jul 31, 2010 · 2 comments
Open

Support ignoreCase option #3

parente opened this issue Jul 31, 2010 · 2 comments

Comments

@parente
Copy link
Member

parente commented Jul 31, 2010

Would be nice to support ignoreCase in queryOptions.

var req = this.model.fetch({
query: {label : '
'+this.query+''},
onBegin: this._onBegin,
onItem: this._onItem,
onComplete: this._onComplete,
onError: this._onError,
start: this._page * this.rowSize,
// fetch one extra to check if there's a next
count: this.rowSize + 1,
/queryOptions: {
deep: false,
ignoreCase: true
},
/
sort : {
attribute : 'label',
descending : true
},
scope: this
});

@gbishop
Copy link
Member

gbishop commented Jul 31, 2010

mongo does not appear to have such an option. It can do ignore case on regular expressions.

@gbishop
Copy link
Member

gbishop commented Jul 31, 2010

You can accomplish the above with this:
query: { label: '/' + this._query + '/i' }

I'm constructing a regular expression with the ignore case flag.

I've got no idea how that will work with sort though...

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

No branches or pull requests

2 participants