Valeme
Valeme

Reputation: 139

How to check class indexes and its properties, type etc by SQL in OrientDB?

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

Answers (1)

Michela Bonizzi
Michela Bonizzi

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

Related Questions