Versant數據庫的對象查詢數據庫
Versant數據庫能夠支持SQL查詢和NOSQL查詢兩種模式,如下爲SQL查詢的例子:session
TransSession session = DistributedDatabaseManager.getInstance()dom
.createNewSession();spa
VQLQuery q = new VQLQuery(對象
session,get
DistributedDatabaseManager.getInstance().HPC_DEMO_NETWORK_NAME,io
"select selfoid from com.versant.domain.Person where firstName='AAF1' and lastName='AAL1'");ast
//"select * from com.versant.domain.Person");object
System.out.println("About to execute query, and load root object.");select
VEnumeration results = q.execute();
// 建立已經走過的朋友路徑,避免迴環
System.out
.println("--------------------------------------------------------------------------");