Within the Genesis platform we provide services which allow for requests which have a single response of the data being requested at that time. Below is an example of a snapshot subscription defined in XML this is similar to the subscription query services we also provide in the Genesis platform. This can contain multiple queries, joining across many tables; however this is a one-shot operation, use to fetch the requested data only once and there are no real-time updates.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
<snapshotQuery name="TRADE"> <metaData> <request> <field name="TRADE_ID" type="STRING"/> </request> <reply> <field name="TRADE_ID" type="STRING" /> <field name="CLIENT_CODE" type="STRING" /> <field name="CLIENT_DESCR" type="STRING" /> <field name="ENTRY_DATETIME" type="DATETIME" /> </reply> </metaData> <tables> <table name="TRADE" alias="tr" seedKey="TRADE_BY_ID"/> <table name="CLIENT" alias="c"> <join key="CLIENT_BY_CODE"> <![CDATA[ c.setString('CLIENT_CODE', tr.getString('CLIENT_CODE')) ]]> </join> </table> </tables> <fields> row.setString("TRADE_ID", tr.getString("TRADE_ID")) row.setString("CLIENT_CODE", tr.getString("CLIENT_CODE")) row.setString("CLIENT_DESCR", c.getString("DESCRIPTION")) row.setDate("ENTRY_DATETIME", tr.getDate("ENTRY_DATETIME")) </fields> </snapshotQuery> |