-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(NODE-6893): Distinguish between command-level options and index-level options when creating indexes #5012
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
Open
seanrmilligan
wants to merge
23
commits into
mongodb:main
Choose a base branch
from
seanrmilligan:sean.milligan/createIndex
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,165
−58
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
8a0866f
Allow passthrough options on createIndexes
991884f
Fix: createIndexes / fromIndexDescriptionArray interaction
ab02deb
drop ticket number from test db string name
e1ad022
Inherit CSOT and other fields from CommandOperationOptions into Creat…
4a4310c
support public api spec / wire property naming differences with a map
214cd1a
prepareUnique requires 6.0+
4c1630b
remove metadata
4d84948
Remove 'key' in resolveIndexDescription, even when allowUnknownIndexO…
44b38b1
Update TODO with ticket number
44c62ee
remove optionality from CreateIndexesOperation options/commandOptions…
f560c71
deprecate option for removal in 8.x
e0ec424
Extend Document to allow unknown options without a @ts-expect-error o…
30f40b0
Add 2dsphere options to IndexOptions interface
56d06d9
remove ts-expect-error
2712b41
Add deprecated comment to two-parameter overload of createIndex
b3279ed
change how I deprecated the allowUnknownIndexOptions parameter on cre…
7339d8a
type tests
9cdbeef
Merge remote-tracking branch 'origin/main' into sean.milligan/createI…
293bdc2
more TODO -> ticket number updates
585c7fd
refactor(NODE-6893): require explicit command options on CreateIndexe…
f9fac6f
Remove clustered, finestIndexedLevel, coarsestIndexedLevel
04ea05d
refactor(NODE-6893): require both arguments on the three parameter cr…
8a5596f
refactor(NODE-6893): remove background from IndexOptions
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -454,7 +454,14 @@ export class Db { | |
| ): Promise<string> { | ||
| const indexes = await executeOperation( | ||
| this.client, | ||
| CreateIndexesOperation.fromIndexSpecification(this, name, indexSpec, options) | ||
| CreateIndexesOperation.fromIndexSpecification( | ||
| this, | ||
| name, | ||
| indexSpec, | ||
| /*allowUnknownIndexOptions=*/ false, | ||
|
Contributor
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. Nitpick: Can we omit /allowUnknownIndexOptions=/ everywhere? Checking the function definition is probably enough to make it clear what's being provided, and this doesn't seem to be a standard practice across the codebase. |
||
| options ?? {}, | ||
| undefined | ||
| ) | ||
| ); | ||
| return indexes[0]; | ||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.