OrientDB在封装字段中使用LIKE

时间:2016-01-11 08:46:55

标签: json orientdb orientdb-2.1

我有一个名为CalculationFunctionGroup的OrientDB表,其中有一个名为functions的字段。

此字段具有以下JSON内容:

[{"@type":"d","@version":0,"@class":"CalculationFunction","name":"AR_0015_0280","code":"//AR_0015_0280 OTTIMIZZATA / FORMATTATA\nvar worka01 = anagPay(\"AR_0015_0280\", -1);\nreturn worka01;","language":"Javascript"}]

我想在JSON的code元素上提取满足LIKE条件的行。

我已尝试过此查询:

SELECT FROM CalculationFunctionGroup
WHERE functions.code LIKE '%OTTIMIZZATA%'

但是提取的行数是零!

1 个答案:

答案 0 :(得分:0)

试试这个:

select expand(distinct(rid))
from (select @rid,functions.code
      from CalculationFunctionGroup unwind functions)
where functions like "%OTTIMIZZATA%"