i'm unable to substring values that i get by running a gremlin query, i've been trying to find this on google but found nothing -


this gremlin query:

g.v('service').has('serviceid','etha12819844').out('associatedtoservice').bandwidth 

result of query orientdb:

i want trim out "mbit/s" string , 70 , make sum(70+70) query. appreciated.

there no string manipulation steps in gremlin, can use lambda:

g.v('service').has('serviceid','etha12819844').out('associatedtoservice').   map {it.get().value("bandwidth").replace("mbit/s", "").tointeger()}.sum() 

however, in long run consider store bandwith number.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -