-
Notifications
You must be signed in to change notification settings - Fork 305
Spike: replace file system with Room/sql #215
Comments
We have the same ideas! I was thinking though of creating a persister module with Room for starters :P |
@pavlospt Let me know how your efforts with a persister module goes with Room. I recently tested an implementation of the persister with Room and it works however it seems difficult to come up with a generic solution. Unlike the FileSystem persister, you're dealing with the POJO entities directly and would need to provide the proper DAO. Further, depending how you ingest the data from an external source (e.g. webservice) you'll lose the ordering of objects when stored in to a DB unless you do extra work to preserve some kind of order. |
@png6 Haven't had the time to start writing one yet. You can PR your solution and we can discuss upon it :) |
One suggestion is to have dao implement persister and then pass the dao as the persister to store. |
closing due to not really being an issue. |
Hey guys, any plans about Room? |
@digitalbuddha any plans to support Room now that stable 1.0 is released? |
It's supported you need to make a Persister pointed to your roomDAO. I was working on a sample but got lazy. Will revive it |
From the discussion above about DAO implementing Persister and passing that at store creation, I thought that the library has to provide additional support for dao. Please post a sample whenever you get a chance, it would be very helpful. Thanks! |
Hey @digitalbuddha , did you get a chance to revive the sample? |
We are currently working on an implementation that works with room. Will
post here when complete. There were code changes needed.
…On Wed, Mar 14, 2018, 2:17 PM Sahib Jaspal ***@***.***> wrote:
Hey @digitalbuddha <https://github.com/digitalbuddha> , did you get a
chance to revive the sample?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#215 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AEUX3LnyFMr1H2zPcL5hf8O4HVs_bk_Eks5teV7TgaJpZM4NezgY>
.
|
Thanks @digitalbuddha! I would appreciate very much a sample how to persist a POST request (usually in offline scenario). |
@sevar83 would you use Retrofit for that request? |
@TwiZ Yes. |
There is a way to persist it without affecting the Retrofit service (we can
define the Room persisting for a later step, the steps are decoupled), I'm
gonna write down a small sample tomorrow morning, could that work?
…On Wed, Mar 14, 2018, 21:11 Svetlozar Kostadinov ***@***.***> wrote:
@TwiZ <https://github.com/twiz> Yes.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#215 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACatuRVt5AfUtdhoIuT9MVkNc55cgSiIks5teXl8gaJpZM4NezgY>
.
|
Hey @digitalbuddha , any news on supporting Room? |
Now that android has a proper orm, we should Spike on depreciating our filesystem and moving to Room (new orm). It seems like you can save nested objects without having to write complex logic yourself, that was always the blocker imo to using sql.
Ideally store should be able to work with retrofit returning a pojo which is the written to and read from Room.
Alternatively we can create Room persisters that work with sql while keeping current File System stuff the same.
Yay exciting times in android!
The text was updated successfully, but these errors were encountered: