How to use js server functions as part of osql

时间:2016-10-20 12:54:40

标签: orientdb

I have a js function with rids as parameter (see "Execute" on screenshot), it works:

enter image description here

I try to use this function with result of subquery in osql:

select testFunction(select @rid from User where someField < 365)

And it gives me Error parsing query of course.

How to use function as part of osql in that case?

1 个答案:

答案 0 :(得分:3)

这应该有效:

select testFunction(@this.@rid) from User where someField < 365

以这种方式,每当它发现一条记录将该单一记录传递给该函数时,它就会调用该函数,依此类推select from User where someField < 365

的每一个结果

希望它有所帮助! 伊万