在嗡接着,如数据时:如何使用Om Next中的所有数据进行连接查询?
{:table {:name "Disk Performance Table"
:data [:statistics :performance]}
:chart {:name "Combined Graph"
:data [:statistics :performance]}
:statistics {:performance {:cpu-usage [45 15 32 11 66 44]
:disk-activity [11 34 66 12 99 100]
:network-activity [55 87 20 1 22 82]}}}
你可以查询它:
[{:chart [{:data [:cpu-usage]}]}]
得到图表,加入data
从performance
记录向下挖cpu-usage
:
{:chart {:data {:cpu-usage [45 15 32 11 66 44]}}}
如何取得整个表现记录?
另一个潜在的查询是这样的:
[{:chart [:data]}]
,但它不能解决加入:
{:chart {:data [:statistics :performance]}}
有没有分量,因为这是唯一的有关数据和查询。这来自练习编号2,并在这里查询:https://awkay.github.io/om-tutorial/#!/om_tutorial.D_Queries它使用om/db->树来运行查询。
可以展开[标签:OM-下一页]标签维基? –
@MarcusMüller确定,完成! – Pablo