Is it possible to do something like a sql UNION select with pact or select a common row from 2 separate tables returning a result?
For example we have 2 tables, and we want to select row ("Bob")
from both tables (ages, favorite-food)
, and return a single object composed of data (age, food)
from both tables .
;Table 1 schema
(defschema table-schema
age:decimal)
;Table 1
(deftable ages:{supply})
;Table 2 schema
(defschema table-schema
food:string)
;Table 2
(deftable favorite-food:{supply})
In such a case, a single function which would return an object containing Bob's age and his favorite food.
Is such a query possible in pact that serves this purpose?