Skip to content

Conversation

@ovr
Copy link
Contributor

@ovr ovr commented Jun 29, 2018

Hey!

It allow us to do (pass advanced options for createIndex)

await db._run('createIndex', 'user', {
        columns: 'login',
        options: {
            name: 'login_uniq',
            unique: true,
            partialFilterExpression: {
                status: {
                    $eq: [
                        'ACTIVE',
                        'BLOCKED'
                    ]
                }
            }
        }
});

Thanks

@ovr ovr force-pushed the allow-to-create-partial-index-by-calling-private-run branch from f0081bc to ae2c522 Compare June 29, 2018 08:28
@ovr ovr force-pushed the allow-to-create-partial-index-by-calling-private-run branch from ae2c522 to a961356 Compare June 29, 2018 08:40
@ovr ovr force-pushed the allow-to-create-partial-index-by-calling-private-run branch from 6d92164 to 1b0068d Compare July 3, 2018 07:48
Copy link

@gjbaxter gjbaxter left a comment

Choose a reason for hiding this comment

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

It'd be nice if we could have enabled the options to be passed to addIndex: function(collectionName, indexName, columns, unique, callback) along side 'unique'.. or.. perhaps an options object replacing unique. But I guess that maybe an interface change?

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.

2 participants