OrientDB

Orient DB - create orient db with password and check if one available using JAVA

a 夏天 提交于 2019-12-11 10:36:16
问题 I saw that we can create orient db using: ODatabaseDocumentTx db2 = new ODatabaseDocumentTx ( "local:C:/temp/db/scratchpad" ).create(); But how can we create orientDB database using password with REMOTE type. And does that checks if a database exists and say. Or if found will it overwrite? 回答1: Maybe you're looking for this: void createDB(){ new OServerAdmin("remote:localhost") .connect("root", "rootPassword") .createDatabase("databaseName", "graph", "plocal").close(); } See here. UPDATE: In

Accessing Connected Vertices in OrientDB Javascript Functions

南笙酒味 提交于 2019-12-11 09:41:43
问题 I'm attempting to use the build in Functions in OrientDB studio to group Workstations that aren't in use by a Person. The query to get these vertices works fine but I'm trying to avoid Traverse as it is very slow - too slow to be used in production. Instead of iterating through each free station and grouping it together with all it's neighbours, keeping each grouped 'named' with the smallest @rid in the set. var groups = {}; //The list of groups of workpoints. The key is the lowest RID in the

npm install orientjs fatal error. where is node_version.h?

百般思念 提交于 2019-12-11 07:37:23
问题 i wanna use orientjs in below environment. windows 10 pro 64bit node v6.9.2 node-gyp v3.4.0 orientjs 2.2.4 1) install "windows-build-tools" $ npm install --global --production windows-build-tools ...ok... 2) install "orientjs" but, i meet fatal error. where is node_version.h? help me. $ npm install orientjs --save npm WARN deprecated node-uuid@1.4.7: use uuid module instead > orientjs-native@2.2.2 install C:\test1\node_modules\orientjs-native > node-gyp rebuild kt@KT-HOME C:\test1\node

OrientDB: Efficient way to select records with a value equal to the max of all such values?

限于喜欢 提交于 2019-12-11 05:10:07
问题 I'm not sure how to do this without using a JOIN (which ODB doesn't have, of course). In "generic" SQL, you might do something like this: Select * FROM table INNER JOIN (SELECT max(field) AS max_of_field, key FROM table GROUP BY key) sub ON table.field = sub.max_of_field AND table.key = sub.key Is there an efficient way to do this in ODB, using SELECT and/or MATCH? 来源: https://stackoverflow.com/questions/49460138/orientdb-efficient-way-to-select-records-with-a-value-equal-to-the-max-of-all-s

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

orient DB: Adding properties to properties

 ̄綄美尐妖づ 提交于 2019-12-11 03:13:25
问题 I am new to orientdb and I am exploring the possibilities. I have a project in mind and I just want to make sure I start in the right direction. To give you a quick idea of what I want to do, think of it like MS Access or Kexi, which means a software that manage database. That explanation will be enough for my question. Some "tables" will be created to manage the software, and other data "tables" will be created by the user. Orient DB use the following "properties" for each "property"/"Field"

Mass / Group Delete OrientDB / Java

爷,独闯天下 提交于 2019-12-11 01:26:50
问题 I am trying to prototype performance results of orientdb mass delete of vertexes. I need to prototype trying to delete more than 10000 upto million. Firstly, I am using the light weight edges property to be false while creating my vertices and edges following this Issue with creating edge in OrientDb with Blueprints / Tinkerpop When I try deleting (Please see below the code) private static OrientGraph graph = new OrientGraph( "remote:localhost/WorkDBMassDelete2", "admin", "admin"); private

Mapping from OWL ontology to OrientDB Graph Database

送分小仙女□ 提交于 2019-12-11 00:58:49
问题 I am working with OWL ontology and I have to import an owl ontology into OrientDB graph database. Is there a solution implemented to parse OWL ontology and map it to a OrientDB Graph or convert owl ontology to labeled property graph and import it into OrientDB? I know there are similar solutions for Neo4J graph database. https://github.com/flekschas/owl2neo4j https://neo4j.com/blog/using-owl-with-neo4j/ For OrientDB? 来源: https://stackoverflow.com/questions/46581663/mapping-from-owl-ontology

How to make orientDB avoid null

て烟熏妆下的殇ゞ 提交于 2019-12-11 00:47:08
问题 When I execute code below, select expand(distinct(@rid)) from ( select from V where @rid = 'number not exist' ) it returns OCommandExecutionException: expression item '@rid' cannot be resolved because current record is NULL This inside select is just for test and it returns no record. I want null to be returned if select returns no record and expand(distinct(@rid)) if select returns some @rid . The environment is OrientDB 2.1.5 and it occurs both in console and studio. Thanks! 回答1: Your query

Orient-db regex modifiers

北战南征 提交于 2019-12-10 20:35:17
问题 I'm working with orient-db database, and I've issues with regex pattern matching. I really need case-insensitive modifier to be present in the request, but somehow it doesn't work as I'm expecting. Query: select from UserAccounts where email MATCHES '^ther.*' Returns as expected matches in lowercase. Whenever I try to add a modifier, outside delimiters i.e. select from UserAccounts where email MATCHES '\^ther.*\i' I get an empty collection. Actually the query returns an empty collection