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

Move field deletion logic into mongo adapter #1471

Merged

Conversation

drew-gross
Copy link
Contributor

Currently due to the _collectionPrefix not being stored in the database adapter, we need to do all sorts of crazy stuff to make sure the mongo adapter knows where the data it needs to delete is. Will fix in a later PR.

// the collectionPrefix. Also, Schemas.js, the caller of this function, only stores the collection
// itself, and not the prefix. Eventually Parse Server won't care what a SchemaCollection is and
// will just tell the DB adapter to do things and it will do them.
deleteFields(className: string, fieldNames, pointerFieldNames, collectionPrefix, adaptiveCollection) {
Copy link
Contributor

Choose a reason for hiding this comment

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

could we implement it on MongoCollection.js instead? otherwise that's good

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, the MongoCollection doesn't have access to the schema collection.

Copy link
Contributor

Choose a reason for hiding this comment

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

meh :(

@codecov-io
Copy link

Current coverage is 92.81%

Merging #1471 into master will increase coverage by +0.01% as of 90832cf

@@            master   #1471   diff @@
======================================
  Files           87      87       
  Stmts         5488    5501    +13
  Branches      1016    1016       
  Methods          0       0       
======================================
+ Hit           5093    5106    +13
  Partial         10      10       
  Missed         385     385       

Review entire Coverage Diff as of 90832cf

Powered by Codecov. Updated on successful CI builds.

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.

4 participants