![]() Just call Query.find() again to execute the query and obtain recent data from the store.įor a more in-depth documentation of the many features ObjectBox queries offer, have a look at the API docs of Query and the query documentation. You can re-use query objects for optimal performance. Once the ObjectBox code generator did its job, you have access to a convenience initializer to setup the object store: Let’s say you have ObjectBox installed (check also our GitHub repository) and you want to persist a Person entity. Also it provides some meta properties you will see in action with queries below. The generated code is the glue between our library and your app code. Don’t worry: This is done in the background and invisible for you. ObjectBox uses Sourcery to generate boilerplate code for you. This minimizes overhead and avoids expensive dynamic look-ups at run time. Instead of inheriting from a base class, ObjectBox uses code generation. Accordingly, there’s also no requirement to inherit from NSObject (of course you still can the choice is yours). ![]() To enable your entity model to be lightweight Swift objects, ObjectBox does not force your entities to inherit from any base class.
0 Comments
Leave a Reply. |