Skip to content

feat: add ListIndexes and ListCollectionNames api - #284

Open
fleetingtimer wants to merge 1 commit into
qiniu:masterfrom
fleetingtimer:feature/listCollections
Open

feat: add ListIndexes and ListCollectionNames api#284
fleetingtimer wants to merge 1 commit into
qiniu:masterfrom
fleetingtimer:feature/listCollections

Conversation

@fleetingtimer

Copy link
Copy Markdown

add ListIndexed and List ListCollectionNames api

Comment thread collection.go
return res
}

// ListIndex returns all indexes in collection

@jiangz222 jiangz222 May 23, 2023

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

typo,ListIndexes

Comment thread collection.go
defer cursor.Close(ctx)

var indexInfos []bson.M
err = cursor.All(ctx, &indexInfos)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Use options.IndexOptions to make ListIndexes and transIndexInfoToIndexModel simpler?

	var indexOptions []options.IndexOptions
	err = cursor.All(ctx, &indexOptions)
	if err != nil {
		return nil, err
	}

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