In PocketQuery 4.0 we introduced the concept of query keys for more PQ technical features. Please have a look at PocketQuery 4.x - Upgrade Notes if you intend to use this API.

The most basic functions of the templating API can be used to access the result set and retrieve or set its columns and content.


Get the result columns of the given query as JSON serialized string:

/**
 * @param {String} queryKey key of the query
 * @return {String} the columns of the query result as array
 */
PocketQuery.queryColumns(queryKey)
JS

Get the result of the given query as JSON serialized string:

/**
 * @param {String} queryKey key of the query
 * @return {Array} the result of the query as JSON
 */
PocketQuery.queryJson(queryKey)
JS

Get the result of the given query as array.

/**
 * @param {String} queryKey key of the query
 * @return query result as array
 */
PocketQuery.queryArray(queryKey)
JS