function cdb_read(pInputA)


Summary

This function reads one or more records from either local or cloud, and returns them as an array.

Inputs

Outputs

(Array) - One or more records with keys as defined by the schema of the accessed database. This includes a key "cdb", which holds metadata

ReadOutput

Additional Requirements

This API call requires internet access to make cloud calls.

API Version

Examples

local tInputA, tDataA

#Table name: clients
#Keys: firstName, lastName, age, income
#A single cdbRecordID: 123456abcdef

put "123456abcdef" into tInputA["cdbRecordID"]
put "clients" into tInputA["cdbTableName"]
put "cloud" into tInputA["cdbTarget"]

put cdb_read(tInputA) into tDataA
#Output: tDataA["123456abcdef"]["cdb"] - metadata
#                              ["firstName"] - value
#                              ["lastName"] - value
#                              ["age"] - value
#                              ["income"] - value