Reputation: 139
I have created Vertex class and id index with type UNIQUE. Now I want to verify if it is created programmatically in my unit test classes.
As I am connecting to the OrientDB via JDBC, I want to check it with pure SQL.
select expand(indexes) from (select expand(classes)
from metadata:schema) where name = '<class-name>'
is not working.
How can I do it?
Upvotes: 1
Views: 185
Reputation: 2632
You can check if an index exists by checking the list of all the available indexes:
select expand(indexes) from metadata:indexmanager
Hope it helps
Regads
Upvotes: 1