Unique Index
To look up data from the unique index:
unique(data_source_name: str, index_name: str, query: str) -> Option<Map>
data_source_nameis the name you gave your lookup tableindex_nameis the name of the unique index you wish to queryqueryis the value that the index will search for- The return value is either a
Mapobject containing the matched row or()
A query from our example table from earlier could look like this:
let value = unique("products", "code", "CLAY-2K");
/*
value = #{
"Product Code": "CLAY-2K",
"Tag": "clay",
"Weight": "2000.0",
"Unit": "g"
}
*/