-
Notifications
You must be signed in to change notification settings - Fork 76
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
Add Support for store.push() and store.pushPayload() #165
Comments
We now have the In what way do you want to add support? |
When I use store.push() to load in data from an external endpoint, its added to the ember data cache, but isn't saved within pouchDB. The rev field isn't populated as well. |
I see that the unloadedDocumentChanged function is used with the couchdb sync to populate the ember-data cache. My scenario is a little different where I'm pulling data from an external source on the client and using store.push() to insert the data into the data store. Using store.push() in this method doesn't add the data into pouchDB. |
Adding data can be done with db.bulkDocs and the |
If we support Edit: I read |
@broerse Would you be able to provide some clarity around how to use In my particular situation, I'm importing a bunch of data once from some json files on the user's local file system. After that point, I'm reading the information from pouch (or at least that is my intention) :) There are a lot of deeply embedded records in the sources files that I'm parsing out with |
@kara-todd Not sure static files with |
@broerse Sorry, that wasn't clear on my part. I have some raw JSON data that is output by another application (a game in this case.) It makes files that contain objects like the following:
As part of my "import events" function I go through and read through the file data as a stream and get the individual objects. However, at present. I'm not transforming them in any way. I'm just importing them "as-is" So:
This isn't quite working as I expected... It seems like the nested objects aren't getting picked up. I should have around 10k records and I'm getting around 2k (which about matches the "top" level objects.) I was previously using |
It would be a great addition to support these two methods for preloading the pouchdb instance with raw data.
https://guides.emberjs.com/v2.10.0/models/pushing-records-into-the-store/
The text was updated successfully, but these errors were encountered: