Plugin updates: search and date format

Datetime:2016-08-23 00:54:16          Topic: DataBase           Share

Today I made a few changes to the Cloudant connnector and Jackson4XPages plugin.

Jackson4XPages

I added a new constructor of the JacksonWrapper, a boolean, to control the date format output in the JSON.

JacksonWrapper wrapper = new JacksonWrapper(datesAsTimeStamps);

By default it is true, so the output format is a Timestamp, but if you need a real date, pass false to the contructor

I committed the changes to the repository and updated the ReadMe.

Cloudant connector

I added a new connector to the plugin, the QueryConnector. In this new part there is the possibillity to actual search the Cloudant database. And have access to the indices.

//search the database
List<?> connector.getQueryConnector().search(final String searchIndexId, final Class<?> cls, final Integer queryLimit, final String query)
//To learn about the query syntax see, https://docs.cloudant.com/search.html

//To get all the indices

List<?> allIndices();

//To find documents using an index

List<?> findByIndex(final String selectorJson, final Class<?> cls)

I committed the changes to the repository and updated the ReadMe.





About List