orientechnologies / orientdb

OrientDB is the most versatile DBMS supporting Graph, Document, Reactive, Full-Text and Geospatial models in one Multi-Model product. OrientDB can run distributed (Multi-Master), supports SQL, ACID Transactions, Full-Text indexing and Reactive Queries.
https://orientdb.dev
Apache License 2.0
4.72k stars 870 forks source link

API Request : OrientVertexType & OrientEdgeType #7190

Closed Solido closed 2 years ago

Solido commented 7 years ago

OrientDB Version: All

OrientVertex.getType()[OrientVertexType].getAllSuperClasses() OrientEdge.getType()[OrientEdgeType].getAllSuperClasses()

But when working with OrientElement I only have getElementType()[String] which is of no use (or maybe I don't know how to use it ! )

So when working with OrientElememt I should explicitly cast it

Is it possible to have OrientVertexType & OrientEdgeType share a common interface like OrientElementType. I know it's not trivial at all, just want to raise the point.

Regards

lvca commented 7 years ago

@Solido in OrientDB v3.0 we made things more coherent and easy to use. @tglman what's the case with OrientElement? Did we change it in 3.0?

luigidellaquila commented 7 years ago

Hi @lvca

In v 3.0 we extended the core module to include a multi-model hierarchy, so we have OElement (an interface for the old ODocument) and two sub-interfaces OVertex and OEdge. This is not TinkerPop stuff, it's OrientDB Core module. The module will keep using OClass for classes and hierarchies (no OVertexType/OEdgeType).

About TinkerPop, as of now it's still as it was in 2.0 (plus the addition of TP3 support), but we can consider adding there a super-interface on top of OrientEdgeType and OrientVertexType. Just wondering if it makes sense to do it in TP2 module, that is slowly going deprecated in favor of TP3...

Thanks

Luigi