OrientDB 在封装字段中使用 LIKE
OrientDB use LIKE in an encapsulated field
我有一个名为 CalculationFunctionGroup
的 OrientDB table,其中我有一个名为 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%'
但是提取的行数为零!
试试这个:
select expand(distinct(rid))
from (select @rid,functions.code
from CalculationFunctionGroup unwind functions)
where functions like "%OTTIMIZZATA%"
我有一个名为 CalculationFunctionGroup
的 OrientDB table,其中我有一个名为 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%'
但是提取的行数为零!
试试这个:
select expand(distinct(rid))
from (select @rid,functions.code
from CalculationFunctionGroup unwind functions)
where functions like "%OTTIMIZZATA%"