What is a Dynamic View in LokiJS?

412 Views Asked by At

I am working on a Hybrid App where I am storing data with LokiJS.

I read the documentation at LokiJS Website, and some of it on Rawgit, and i am good at basic concepts like creation of db, collection and operations on them.

But I really did not understand what a Dynamic View is! :|

And also, how do we write code asynchronously with LokiJS? I am confused with the Adapters concept too!

Can someone help me on this in simple words or some clear reference where explanation for this exist?!

Thank you very much!

1

There are 1 best solutions below

0
On

According to the LokiJS documentation at http://techfort.github.io/LokiJS/DynamicView.html

DynamicView class is a versatile 'live' view class which can have filters and sorts applied. Collection.addDynamicView(name) instantiates this DynamicView object and notifies it whenever documents are add/updated/removed so it can remain up-to-date.