with live     
Works with 2.1.10 
not works with 2.1.11 
reason is as i described  before... 

   String currentPath = "remote:localhost/friend";
        OrientGraphFactory orientGraphFactory = new 
OrientGraphFactory(currentPath, "db", "dbpassword");
        final JsonObject sets = new JsonObject().put("has_user_id", 
0).put("time", new Date().getTime()).put("updated", false);
        EdgeCreateBuilder query = 
EdgeQueryBuilder.create("has_user").from("select from 
vsequence").to("select from vsequence").value(sets);
        OrientGraph database = orientGraphFactory.getTx();        
        List<ODocument> tokenList = database.command(new OLiveQuery<>("live 
select from has_user", new OLiveResultListener() {

            @Override
            public void onLiveResult(int iLiveToken, ORecordOperation iOp) 
throws OException {               
              
                System.out.println("New result from server for live query " 
+ iLiveToken);
                System.out.println("operation: " + iOp.type);
                System.out.println("content: " + iOp.record);
            }
        })).execute();
       //*Waiting after execute 
        int token = tokenList.get(0).field("token");
        String sqlQuery = query.sql();
        database.begin();
        database.command(new 
OCommandSQL(sqlQuery)).execute(query.parameters());
        database.commit();
        database.command(new OCommandSQL(StringUtils.append("live 
unsubscribe ", token))).execute();

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to