pyorient

How to make a ST_spatial query ST_Within Orientdb by selecting spatial classes

…衆ロ難τιáo~ 提交于 2020-01-03 03:05:32
问题 I am trying to understand how to use the LUCENE Spatial queries in Orientdb 2.2.17 using pyorient. I have note yet figure it out how to select all the properties of a point vertex class that is within a polygon vertex from another class. Region Vertex Class has two properties: name coordinates (EMBEDDED OPolygon) LUCENE index CREATE CLASS Region EXTENDS V CREATE PROPERTY Region.name IF NOT EXISTS STRING CREATE PROPERTY Region.coordinates IF NOT EXISTS EMBEDDED OPolygon CREATE INDEX Region

How to make a ST_spatial query ST_Within Orientdb by selecting spatial classes

二次信任 提交于 2020-01-03 03:05:07
问题 I am trying to understand how to use the LUCENE Spatial queries in Orientdb 2.2.17 using pyorient. I have note yet figure it out how to select all the properties of a point vertex class that is within a polygon vertex from another class. Region Vertex Class has two properties: name coordinates (EMBEDDED OPolygon) LUCENE index CREATE CLASS Region EXTENDS V CREATE PROPERTY Region.name IF NOT EXISTS STRING CREATE PROPERTY Region.coordinates IF NOT EXISTS EMBEDDED OPolygon CREATE INDEX Region

What is the correctly way to delete edges with orientdb OGM in django rest framework?

橙三吉。 提交于 2019-12-13 02:44:30
问题 I don't know how to create a method to delete edges in django rest framework, using orientdb OGM. I'm using pyorient==1.5.5 and OrientDB 3.0.18 version. I have two vertex Classes: ousers, ocompany. Also I have two relationships (edges) Classes: ofriends, oworksat. So for example: To make a ofriends relationship I need two ousers. And to make a oworksat relationship I need one ouser and one ocompany. Every relationship has it own cluster id. I know that I can access to these functions: (Pdb)

Check class creation in OrientDB

ぃ、小莉子 提交于 2019-12-11 04:05:01
问题 I'm trying to create classes with pyorient driver but sometime if class exists I got class exists message. Is there a way to check whether class is exists or not in OrientDB python driver? Here is part of my sample code for class creation... @classmethod def create(cls): cls._cluster_id = OrientEngine.client.command("CREATE CLASS %s EXTENDS V" % cls.__name__) return cls._cluster_id 回答1: Via SQL to check the existence of "OUser" class execute this: SELECT FROM ( SELECT expand( classes ) FROM