-
Notifications
You must be signed in to change notification settings - Fork 79
How to make calculable property
Ilia Naryzhny edited this page Mar 15, 2015
·
2 revisions
It's very simple to create calculable property!
- Create new property as usual
- Mark property "Calculable"
- Specify script for value calculation
Script is OrientDB SQL, but actual value should be in column named "value".
Examples:
select sum(a, b) as value from MyClass where @rid = ?
select sum(e.salery) as value from Employee e where e.department = ?
In case of calculation just for a current row you can use short notation:
sum(a, b)
instead of
select sum(a, b) as value from MyClass where @rid = ?
Wanna check it out? Use demo server! (Usernames/passwords: admin/admin, writer/writer, reader/reader)