function cdb_Query(pInputA)


Summary

This function searches the specified table over the cloud, and returns the subset that matches that query in several possible formats. See comparison operators to find all operators allowed in a query.

Inputs

*optional parameter.

Query input diagram

Outputs

Additional Requirements

This API call requires internet access.

API Version

Examples

local tQueryA, tInputA, tOutputA

#Table name: clients
#Keys: firstName, lastName, age, income

#Construct "query" array
put "firstName" into tQueryA["key"]
put "John" into tQueryA["value"]
put "=" into tQueryA["operator"]

#Set up the input array
put tQueryA into tInputA["query"]
put "clients" into tInputA["cdbTableName"]
put "cloud" into tInputA["cdbTarget"]

#recordData output format
put "recordData" into tInputA["resultFormat"]
#OR
#recordList output format
put "recordList" into tInputA["resultFormat"]

put cdb_Query(tInputA) into tOutputA

#recordData Output: tOutputA[123456abcdef]["cdb"] - metadata
                               ["firstName"] - value
                               ["lastName"] - value
                               ["age"] - value
                               ["income"] - value

#recordList Output: 123456abcdef