Nozbe / WatermelonDB

🍉 Reactive & asynchronous database for powerful React and React Native apps ⚡️
https://watermelondb.dev
MIT License
10.49k stars 589 forks source link

Storing dynamic data #193

Closed cemremengu closed 5 years ago

cemremengu commented 5 years ago

Is it possible to store dynamic data (i.e. without setting up any models)? We are running some ad-hoc queries on our main database but don't know the schema of result set beforehand.

rkrajewski commented 5 years ago

Hi @cemremengu. You can use @json type field in a model. It uses sanitize function for unsafe data. https://github.com/Nozbe/WatermelonDB/blob/master/docs/Advanced/AdvancedFields.md#json

Is this what you look for?

radex commented 5 years ago

@cemremengu Closing this issue, since no reply. Let us know if this solves your problem