orientdb - How Do I Call SQL Function inside SQL Query -


i have 2 orientdb questions.

  1. for example have function called getall

    "select v name =:name"

i wish retrive result in simple sql query liket his

select type (getall("test")) 

how can accomplish ?

  1. is possiable run new sql select query new parameters based on previous queries? example

    select $c v let $a = (select v name = 'test1') , $b = (select v type = 'type1') , $c = (select v type = $b , name = $a)

this case working takes lot of time (as understands happens because runs on content of v)

thanks in advance.

to call function try this:

select getall("test") 

with retrieve rid, if want properties try this:

select expand(getall("test")) 

if want retrieve type property, can in 2 ways:

  1. select type from(select expand(getall("test")))
  2. modify function in way select type v name = :name

for second question pretty close, i've modify little bit:

select $c v  let $a = (select v name = 'test1') ,  $b = (select v type = 'type1') ,  $c = (select v type contains $b.type , name contains $a.name) 

hope helps

regards


Comments

Popular posts from this blog

javascript - Replicate keyboard event with html button -

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Web audio api 5.1 surround example not working in firefox -