phpcr / phpcr-shell

PHPCR Shell
MIT License
69 stars 19 forks source link

Introduce expression language in UPDATE queries #141

Closed dantleech closed 9 years ago

dantleech commented 9 years ago

This PR introduces the possiblitiy of setting property values to the result of an expression evaluation using the $row object.

For example:

UPDATE [nt:unstructured] AS a SET a.title = expr('row.getNode().getName()') WHERE localname() = 'article1'
UPDATE [nt:unstructured] AS a SET a.weight = expr('row.getNode().getPropertyValue("weight") * 2') WHERE a.name = 'Product One'