Skip to content

Conversation

@davimacedo
Copy link
Member

No description provided.

@flovilmart
Copy link
Contributor

Thanks @davimacedo for the PR. What format of data do you intend to let people import from? Should it be backwards compatible with the JSON export format that parse.com provided?

@codecov-io
Copy link

codecov-io commented Jul 20, 2016

Current coverage is 91.93% (diff: 100%)

Merging #2350 into master will increase coverage by 0.08%

@@             master      #2350   diff @@
==========================================
  Files            95         96     +1   
  Lines         10708      10761    +53   
  Methods        1309       1317     +8   
  Messages          0          0          
  Branches       1741       1752    +11   
==========================================
+ Hits           9835       9893    +58   
+ Misses          873        868     -5   
  Partials          0          0          

Powered by Codecov. Last update fa49f05...a526ad8

@davimacedo
Copy link
Member Author

Yes... that's the idea...
It can be both a rest array [{...}, {...}] or a json with results field { results: [{...}, {...}] }
I added test for both.

@flovilmart
Copy link
Contributor

flovilmart commented Jul 20, 2016

That won't be backwards compatible with the export as the export has objectId set, and we currently don't support creating object (with rest.create) with an objectId. Can you add a test for that?

Also, what about consecutive imports with the same data? Imagine the process fail in the middle, the promise will reject. How would you handle preventing de-duplicating the inserted objects?

Also, you should properly handle relation objects, and I don't believe rest.create let you pass the _Join:relation:Class as a className.

@ghost
Copy link

ghost commented Jul 25, 2016

@davimacedo updated the pull request.

@ghost
Copy link

ghost commented Jul 25, 2016

@davimacedo updated the pull request.

1 similar comment
@ghost
Copy link

ghost commented Jul 25, 2016

@davimacedo updated the pull request.

@davimacedo
Copy link
Member Author

@flovilmart solved and tested issues related to ObjectId. About relation I verified and parse.com exports as a separated file. I suggest address it as a separated issue because it will require additional endpoint. What do you think?

@ghost
Copy link

ghost commented Aug 3, 2016

@davimacedo updated the pull request.

2 similar comments
@facebook-github-bot
Copy link

@davimacedo updated the pull request.

@ghost
Copy link

ghost commented Aug 3, 2016

@davimacedo updated the pull request.

@tillifywebb
Copy link

Where can I get info on what this API will do. How long till it is ready. We need an easier way to set-up a users install data when they sign-up. Right now we need to add 20-30 objects into one class alone on sign-up and using save-all etc just seems slow and clumsy to code. Would be awesome if this api made that simpler. Can someone advise.

@flovilmart
Copy link
Contributor

@tillifywebb that won't help with that, as it is as performant as a saveAll call. I suggest you use a beforeSave or afterSave.

This endpoint is targeted for the dashboard tu upload large amounts of data

@flovilmart
Copy link
Contributor

@davimacedo need a rebase before we can move forward with that one in that state.

@drew-gross what do you think of that feature? It seems to me that is should support file uploads instead of request body.

@ghost
Copy link

ghost commented Sep 3, 2016

It's been a while since the last commit was reviewed and the labels show this pull request needs review. Based on the blame information for the files in this pull request we identified @flovilmart as a potential reviewer. Could you take a look please or cc someone with more context?

@davimacedo
Copy link
Member Author

@flovilmart It was pretty rush for me in the last days but I will rebase it this week. I also have already done the code for uploading the files from dashboard. So I think it won't be necessary file upload here. I will send PR in dashboard project as well.

@flovilmart
Copy link
Contributor

This endpoint, as is, is just a glorified batch call with all the objects (and the objectId override). If it doesn't support uploading a file, that's pretty useless.

@facebook-github-bot
Copy link

@davimacedo updated the pull request - view changes

@facebook-github-bot
Copy link

@davimacedo updated the pull request - view changes

@facebook-github-bot
Copy link

@davimacedo updated the pull request - view changes

@davimacedo davimacedo closed this Nov 13, 2016
@davimacedo davimacedo deleted the importEndpoint branch November 13, 2016 16:37
@davimacedo davimacedo restored the importEndpoint branch November 13, 2016 16:44
@davimacedo
Copy link
Member Author

Moved to:
#3046

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.

6 participants