1 Answer
1

There will be; we're working on it. I plan to have the QML U1DB declarative API published soon.

In the meantime, until that arrives, you may find this code interesting; it is a simple notes app, but written with QML and using U1DB. This U1DB QML addition follows the declarative QML U1DB API I mentioned above, but it's a Python-based prototype of that API. So, it's very very hacky indeed, and will be replaced with a proper U1DB QML setup as part of the Ubuntu SDK, but you may find it useful to experiment with. In particular, you'll see from this code how to declaratively declare a U1DB database, indexes, documents, and queries, and from this code that a U1DBQuery is a ListModel. That code should give you some idea of how you will be able to use U1DB from QML in Ubuntu Phone, although I must repeat that the implementation of that API from Python is a hacky prototype.