Mindoo Blog - Cutting edge technologies - About Java, Lotus Notes and iPhone

  • New Domino JNA version with support for Domino Query Language (DQL) in Domino V10

    Karsten Lehmann  12 October 2018 00:07:25
    Today I released version 0.9.20 of our Domino JNA project. This version contains the following new features:

    • Added support for Domino Query Language (DQL) on Domino V10
    • Added basic support to read MIME items (NotesMIMEPart) via getItemValue
    • Added NotesNote.attachFile with in-memory file generation
    • Added NotesDatabase.isDesignHidden()
    • Added utility class to read and write Out-out-office information
    • Bugfixing

    The version is available on Maven Central and as an XPages extensibility API in the releases area of the project on Github.

    Now that Domino V10 is out, we can leverage new functionality, e.g. DQL, but the new functionality has been added in a way that the remaining project still runs on Domino R9.0.1 servers.



    Domino Query Language (DQL)


    Domino V10 provides a new facility to run adhoc searches against Notes databases, using the new Domino Query Language, with a much better performance compared to a classic database search via formula language.


    At CollabSphere 2018, John Curtis, software architect and lead on the DQL project at HCL, gave an introduction to the available search options, how queries are planned and executed and how search performance can be improved by creating lookup views that the facility then uses for efficient data lookups.


    You can find a session recording here
    :
    Demo and Deep Dive: Domino General Query Facility and DominoDB NPM

    and here are links to the Domino Query Language documentation and a technote describing the
    DQL Restrictions for Domino 10.0.0.

    One of the main restrictions in Domino 10.0.0 is that DQL searches can only be run via the new AppDev Pack for Node.js (beta).

    There is no support yet to use DQL in LotusScript and the Notes.jar Java API. This will be added in 10.0.1, planned for the end of the year.

    Domino JNA to the rescue! :-)

    For our Domino JNA project, there is no such restriction, as we are calling the DQL C API method directly.
    So this gives you a chance to play with DQL a bit ealier.

    To prevent malformed queries and malicous code injection, we provide some tooling to build queries in code instead of composing the query string manually.

    There is a test case on Github that demonstrates all the available search options.

    A DQL search returns a set of note ids for matching documents, in the Domino C API called an IDTable (in Domino JNA: NotesIDTable).
    By nature, note ids in an IDTable are sorted in ascending note id order, because that is the way they are written in memory (compressed to reduce memory consumption, see this technote for details).

    To display DQL search results in a web application, a note id sort order is not really useful, that's why the test case demonstrates a technique to cast the IDTable onto a Domino view.

    In short, this means that you can efficiently filter a view down to only return view rows with note ids from that IDTable.

    Blog series about Domino JNA

    Another topic that I would like to draw your attention to is a great blog series about Domino JNA, written by Mark Leusink.

    The first two articles are already available and demonstrate how to implement faceted searches:

    Query Domino data and faceted search with Domino JNA (part 1): setup, sorting and pagination

    Query Domino data and faceted search with Domino JNA (part 2): filtering

    I am really glad and thankful that he is working on this since my free time is still very limited.


    Comments
    No Comments Found