2016-04-23 52 views
-1

我已經創建了一個實體與庫中的圖形在我的應用程序中的字段名稱和姓氏,我插入了一個記錄perfetto現在我怎麼能從實體只取一個名字? 謝謝 翁貝託過濾器與庫中的圖形

回答

0

你的問題不是很清楚。我想你想用一個屬性鍵來搜索一個實體的Graph,這是否正確?如果是這樣,這就是你要找的。

let graph: Graph = Graph() 
let collection: Array<Entity> = graph.searchForEntity(properties: [(key: "name", value: nil)]) 

該集合將包含所有擁有屬性關鍵字name的實體。

+0

對不起,我的英語。 act act = Entity(type:「Record」) act [「tempo」] =「09:00」 act [「tentativi」] =「2」 act [「valore」] =「decimi」 我有以「valore」=「decimi」讀入實體「Record」中的所有數據。 是否正確let graph:Graph = Graph() let collection:Array = graph.searchForEntity(properties:[(key:「valore」,value:「decimi」)])? –

+0

看起來正確。這將返回具有該鍵/值對的所有實體類型。圖真的有很多不同的方式。它旨在按照您的想法工作。 – CosmicMind