Is there a "view" equivalent on orientdb?
I have a rdbms background and am looking for a way to save a query as an object which i can query directly.
Take for example the following query
SELECT mobile_number AS mobile_number,
verifications.verification_code[0] AS verification_code,
verifications.is_verified[0] AS is_verified,
Max(verifications.active_devices .@ rid) AS device_rid,
verifications.active_devices .@ version AS active_version
FROM guests
I would like to create a "view" with this query called verified_guests
, then I would like to execute a query against verified_guests
using something like select from verified_guests
In the rdbms world, I would be able to do the following
create view verified_guests as
SELECT mobile_number AS mobile_number,
verifications.verification_code[0] AS verification_code,
verifications.is_verified[0] AS is_verified,
Max(verifications.active_devices .@ rid) AS device_rid,
verifications.active_devices .@ version AS active_version
FROM guests
then I would be able to select * from verified_guests
.
Does orientdb have an equivalent or an alternative to this?
Any guidance is appreciated.
Thanks,