[orientdb] Re: Deleting a class with a name containing special characters

2015-05-25 Thread alessandrorota04
Hi, first try to delete the verteces of the class and after delete the class. Bye, Alessandro Il giorno martedì 12 maggio 2015 00:29:38 UTC+2, retrography ha scritto: > > Hi Everyone, > > I have made a class by mistake that has special characters in its name. It > is called: > > = _orphan_files

[orientdb] Re: How to limit N item per group

2015-05-25 Thread alessandrorota04
Hi, try use the top clause limit. Bye, Alessandro Il giorno mercoledì 13 maggio 2015 01:14:37 UTC+2, z0mbie42 ha scritto: > > Hi all, > > I have a model like this : > (User)->[SentMessage]->(message)->[MessageTo]->(ChatRoom) > > and i want to retrieve only the 10 last messages In a given ChatRoom

[orientdb] Re: Querying based on an attribute

2015-05-25 Thread alessandrorota04
Hi, try this SQLquery select * from (select expand(out('Specializes').out('Accepts') from Specialty)) where name='aetna' Bye, Alessandro Il giorno venerdì 8 maggio 2015 22:35:58 UTC+2, Topping Bowers ha scritto: > > Hello! I'm trying to do a query that says "select all vertexes where there > is

[orientdb] Re: A Graph Query question

2015-05-25 Thread alessandrorota04
Hi Brett, try this SQLquery select name,in('Discuss').roomId from (select expand(out('Started').out('Discuss')) from User where name = 'julie') Bye, Alessandro Il giorno sabato 23 maggio 2015 04:17:19 UTC+2, Brett Coffin ha scritto: > > I am building a chat room engine and I have a graph like so

[orientdb] Re: Where to start

2015-05-27 Thread alessandrorota04
Hi Luis, this is a simple example, I create two Vertex and one Edge OrientGraph g=new OrientGraph(path); // create class Person OClass cl=g.createVertexType("Person", "V"); cl.createProperty("name", OType.STRING); cl.createProperty("surname", OType.STRING); // create edge Friend

[orientdb] Re: A Graph Query question

2015-05-28 Thread alessandrorota04
Hi Brett, I created this graph. and when I run the query I get these results. I hope it can

[orientdb] Re: A Graph Query question

2015-05-28 Thread alessandrorota04
Hi Brett, if I understand the problem, try this query select name , in('Discuss').in('Started').out('Started')[roomId] from Item Bye, Alessandro Il giorno sabato 23 maggio 2015 04:17:19 UTC+2, Brett Coffin ha scritto: > > I am building a chat room engine and I have a graph like so: > > U

[orientdb] Re: Create edge from the same class data

2015-05-29 Thread alessandrorota04
Hi Kapil, have you got a screenshot of your schema ? Bye, Alessandro Il giorno venerdì 29 maggio 2015 09:12:37 UTC+2, Kapil Ranade ha scritto: > > I have imported hierarchical data into OrientDB from RDMBS using OETL. > > In RDBMS we used to store parentId in the same row. e.g. the table > str

[orientdb] Re: Create edge from the same class data

2015-06-01 Thread alessandrorota04
Hi Kapil, try this function var g=orient.getGraph(); var b=g.command('sql','select from Nodex') for(i=0;i > I have imported hierarchical data into OrientDB from RDMBS using OETL. > > In RDBMS we used to store parentId in the same row. e.g. the table > structure is something like this: > > ID - N

[orientdb] Re: Querying based on an attribute

2015-06-01 Thread alessandrorota04
Hi, try this query select expand(in('Accepts').in('Specializes')) from (select expand(out('Specializes').out('Accepts')[name= 'aetna']) from Specialty) Bye, Alessandro Il giorno venerdì 8 maggio 2015 22:35:58 UTC+2, Topping Bowers ha scritto: > > Hello! I'm trying to do a query that says "selec

[orientdb] Re: [Problem] [First Try] reloading objects java

2015-06-01 Thread alessandrorota04
Hi Jean, try this code in the class ObjectStorer OObjectIteratorClass i = tx.browseClass(Order.class) ; for (Order or : i){ or.getName(); List listOrderItem=or.getItems(); for(OrderItem it:listOrderItem){ it.getName(); it.getId(); it.getValue(); } System.out.println (or); } Bye, Alessandro Il g

[orientdb] Re: Interesting edge handling

2015-06-01 Thread alessandrorota04
Hi, you can explain better, because I don't understand what you want to achieve from the query. Bye, Alessandro Il giorno lunedì 1 giugno 2015 15:50:36 UTC+2, kova...@gmail.com ha scritto: > > > Hello! > > I would like to ask you a question, or at least if you have seen similar: > I have the fol

[orientdb] Re: Select distinct vertices according to edge filter

2015-06-03 Thread alessandrorota04
Hi, for the first question you can use the DISTINCT clause, for example : SELECT distinct(outV()) FROM Called WHERE start_time>X AND end_time > Hi, > > two small questions from an OrientDB beginner... > > I have a graph with one type of Vertices - "Person" - and one type of > Edges - "Called". >

[orientdb] Re: Select distinct vertices according to edge filter

2015-06-03 Thread alessandrorota04
Hi Lior, try this query select distinct(id) as id from (select expand( $c ) let $a = ( SELECT outV() as id FROM Called WHERE start_time>10 AND end_time<11 ), $b = ( SELECT inV() as id FROM Called WHERE start_time>10 AND end_time<11 ), $c = unionAll( $a, $b )) Alessandro > -- --- You rec

[orientdb] Re: Does the AVG() method supports some parameter to return decimal values as well?

2015-06-03 Thread alessandrorota04
Hi, if your rating is an integer variable, the method avg() will return an integer value. So either you change the type of the variable, or use this query select AVG(rating.asFloat()) from Ratings Alessandro > -- --- You received this message because you are subscribed to the Google Group

[orientdb] Re: The vertex has been deleted

2015-06-04 Thread alessandrorota04
Hi Mohammad, you can post all the code of the class test. Regards, Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to orient-database+unsubscr...@goo

[orientdb] Re: The vertex has been deleted

2015-06-04 Thread alessandrorota04
Hi Mohammad, I tried your code using the graph java api and v2.0.10 of orientdb and it works. Try to write : OrientVertex vertex = graph.addVertex("class:test"); graph.commit() OrientGraph graph2 = graphFactory.getTx(); vertex.setProperty("test", "value"); Regards, Alessandro -- --- You re

[orientdb] Re: Orientdb graph database storing objects in vertices

2015-06-05 Thread alessandrorota04
> > Hi, > can you post your code ? Regards, Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to orient-database+unsubscr...@googlegroups.com. For mor

[orientdb] Re: Orientdb graph database storing objects in vertices

2015-06-08 Thread alessandrorota04
> > Hi, > class Data must implement Serializable and provide for this class get method. Try this code first.setProperty("name","anything"); first.setProperty("DATA", data.getList()); Regards, Alessandro -- --- You received this message because you are subscribed to the

[orientdb] Re: Database 'GratefulDeadConcerts' is not configured on server

2015-06-08 Thread alessandrorota04
Hi, you can try to reinstall orientdb-2.1-rc3 Regards, Alessandro > -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to orient-database+unsubscr...@googlegroups

[orientdb] Re: Orientdb graph database storing objects in vertices

2015-06-08 Thread alessandrorota04
> > Hi, > try this code Data data = new Data(); data.addData("a","b","c"); Gson gson = new Gson(); String json = gson.toJson(data); Vertex first = graph.addVertex(null); first.setProperty("name","anything"); first.setProperty("allprop",json.toString()); Regards,

[orientdb] Re: Orientdb graph database storing objects in vertices

2015-06-08 Thread alessandrorota04
Hi, i have tried this code and it seems to work OrientGraph graph = new OrientGraph("memory:test"); Data data = new Data(); data.setNome("New Data"); data.addData("a","b","c"); JSONObject json=new JSONObject(); json.put("data", data); Vertex first = gr

[orientdb] Re: Orientdb graph database storing objects in vertices

2015-06-08 Thread alessandrorota04
Hi, I have created a small example with the class Data and the class Test Let me know if it works. Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to

[orientdb] Re: Query comprehension question

2015-06-09 Thread alessandrorota04
Hi, for the second case only, try this query select from (traverse outE("access"),out("access") from #12:17) where @class= 'access' and (in = #13:8 or out= #12:17) Regards, Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubs

[orientdb] Re: Query comprehension question

2015-06-09 Thread alessandrorota04
Hi, when you use "traverse out()" you get only the outgoing vertexes, I have wrote in the query "outE()" because I want to get also the outgoing edges. With the "out=" I want to get the edge that have as outgoing vertex, the vertex with @rid=#12:17 Alessandro -- --- You received this messa

[orientdb] Re: Help on query syntax

2015-06-09 Thread alessandrorota04
Hi, can you post your schema ? Regards, Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to orient-database+unsubscr...@googlegroups.com. For more opt

[orientdb] Re: select custom function in graph.command

2015-06-10 Thread alessandrorota04
Hi Bryan, can you post your schema ? Regards, Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to orient-database+unsubscr...@googlegroups.com. For mor

[orientdb] Re: A Hint for the IN-Operator needed

2015-06-10 Thread alessandrorota04
Hi, can you post your schema, because i don't sure if i have understand it very well. Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to orient-datab

[orientdb] Re: Help on query syntax

2015-06-11 Thread alessandrorota04
Hi Giovanni, I have tried the query SELECT EXPAND( out('hasDetail') ) FROM Module WHERE code = 'Module' and I have got only the vertex Module with the code Module Regards, Alessandro -- ---

[orientdb] Re: select custom function in graph.command

2015-06-11 Thread alessandrorota04
Hi Bryan, I had received your file and I'm working on , when I'm done I'll let you know Alessandro > -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to orient

[orientdb] Re: A Hint for the IN-Operator needed

2015-06-11 Thread alessandrorota04
Hi, which version of OrientDB are you using? Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to orient-database+unsubscr...@googlegroups.com. For mo

[orientdb] Re: A Hint for the IN-Operator needed

2015-06-11 Thread alessandrorota04
Hi, I have created this graph and when i run the query i get the following result In the f

[orientdb] Re: Update en embedded list of string field by adding another string value

2015-06-11 Thread alessandrorota04
Hi, I failed with sql and then i have tried with java api OrientGraph g=new OrientGraph(currentPath); String colorToAdd="blue"; Iterable result=g.command(new OSQLSynchQuery("select from Person where perName='Luca'")).execute(); for(Vertex v:result){ OTrackedList track=v.getProperty("favColours")

[orientdb] Re: Issue with Adding Edge. OSerializationException

2015-06-12 Thread alessandrorota04
> > Hi, > the method getTags() is undefined for the type Object. Can you post all code ? Regards, Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, se

[orientdb] Re: case insensiti index

2015-06-12 Thread alessandrorota04
Hi, I think that the property and the index are dependent. If you create a property foo not ci and you create an index ci when you run the query "select from Test where foo='test' you get both records with 'test' and 'Test' Regards, Alessandro -- --- You received this message because you are s

[orientdb] Re: A Hint for the IN-Operator needed

2015-06-15 Thread alessandrorota04
Hi, you can find an example of using unionall here http://orientdb.com/docs/last/SQL.html For example select expand($c) let $a = (select from categories), $b = (select from contract), $c = unionAll( $a, $b ) Regards, Alessandro -- --- You received this message because you are subscribed to

[orientdb] Re: Examples for EMBEDDED, LINKEDLIST and LINKEDSET

2015-06-15 Thread alessandrorota04
Hi, this is an example with graph database OrientGraph g=new OrientGraph(currentPath); OClass p=g.createVertexType("Person", "V"); p.createProperty("name", OType.STRING); p.createProperty("lista", OType.LINKLIST); OClass c=g.createVertexType("Contract", "V"); c.createProperty("name", OType.STRING)

[orientdb] Re: Examples for EMBEDDED, LINKEDLIST and LINKEDSET

2015-06-15 Thread alessandrorota04
Hi, this in the example with document database ODatabaseDocumentTx db = new ODatabaseDocumentTx(path); db.open("root","root"); ODocument c = new ODocument("Contract"); c.field("name", "contract 1"); c.save(); List linklist = new ArrayList(); linklist.add(c); ODocument p = new ODocument("Person")

[orientdb] Re: sub query not returning result

2015-06-16 Thread alessandrorota04
Hi Hamid, can you post all the code ? Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to orient-database+unsubscr...@googlegroups.com. For more optio

[orientdb] Re: embedded , embeddedList ect

2015-06-18 Thread alessandrorota04
Hi, I think that this behavoir is that expected. Embeddedlist allows duplicate values, but the list isn't ordered and then when you add a value in embeddedlist this value will be the last. Regards, Alessandro -- --- You received this message because you are subscribed to the Google Groups "O

[orientdb] Re: Creating embedded field values using server side javascript.

2015-06-19 Thread alessandrorota04
Hi Olof, if you want to put an embedded list into an embedded map try this code OClass cl=g.createVertexType("ip", "V"); cl.createProperty("str_a", OType.STRING); cl.createProperty("emb_b", OType.EMBEDDEDMAP); List lista=new ArrayList(); lista.add("#12:1"); lista.add("#12:2"); List lista2=new Ar

[orientdb] Re: Filter query when out() vertex is a collection

2015-06-19 Thread alessandrorota04
Hi , can you explain what you want to achieve by the query ? An example of query could be : select name, sum(out('Owns').balance) as sum FROM Employee WHERE name='Cap. America' and (out('Owns').type in ('C') and in('Employs').status in ('A') or (out('Owns').type in ('P') or in('Employs').statu

[orientdb] Re: Get the longest path in a graph

2015-06-19 Thread alessandrorota04
Hi Luis, try the method getDistance(String rid_from, String rid_to) in the attached file LongestPath.java Regards, Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, s

[orientdb] Re: OrientDB direct/indirect edges

2015-06-23 Thread alessandrorota04
Hi Pasquale, for the first question try this code OrientGraph g=new OrientGraph(path); OClass cl=g.createVertexType("MyVertex", "V"); OClass cl2=g.createEdgeType("MyEdge", "E"); cl2.createProperty("out",OType.LINK, cl); Regards, Alessandro -- --- You received this message because you are sub

[orientdb] Re: OrientDB direct/indirect edges

2015-06-23 Thread alessandrorota04
Hi , for the second question i think that you must create two edges with different orientation OrientEdge eFriend=g.addEdge("class:friend", ListPerson.get(j), ListPerson.get(j+1), null); OrientEdge eFriend=g.addEdge("class:friend", ListPerson.get(j+1), ListPerson.get(j), null); Alessandro -

[orientdb] Re: using results obtained from previous let statements in next statements

2015-06-24 Thread alessandrorota04
Hi, for your example you can try this query select count(*) from oemdetail where Build = $b[0].name let $b = (select sanityBuild from currenttable where version = '11.6.0') or this function var g=orient.getGraph(); var b=g.command('sql','select sanityBuild from currenttable where version = '11.6

[orientdb] Re: Access JSON parameters inside Javascript fuction

2015-06-24 Thread alessandrorota04
Hi, you can't get rid with r.getProperty('rid') because rid isn't a property but it is a metadata you can try this code var rid=r.getId().toString(); return rid; Regards, Alessandro -- --- You received this message because you are subscribed to the Google G

[orientdb] Re: Access JSON parameters inside Javascript fuction

2015-06-24 Thread alessandrorota04
Hi Norman, can you post all the code of your function, the parameters ( and the types) and your schema Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an ema

[orientdb] Re: Access JSON parameters inside Javascript fuction

2015-06-25 Thread alessandrorota04
Hi Norman, try this function with the parameter record = {"rid":"123","val":{"name":"Norman","phone":"Home"}} var obj = JSON.parse(record); var rid= obj.rid; var val = obj.val; var name= val.name; var phone= val.phone; return name; Regards, Alessandro -- --- You received this message beca

[orientdb] Re: How to modify a LINKSET after initial vertex creation

2015-06-25 Thread alessandrorota04
Hi Bill, which version of OrientDb are you using? Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to orient-database+unsubscr...@googlegroups.com. For

[orientdb] Re: How to modify a LINKSET after initial vertex creation

2015-06-25 Thread alessandrorota04
Hi Bill, if you use orientdb-2.1-rc3, the following instructions work update App add xOut = [#14:1] where @rid=#12:1 update #12:1 add xOut = [#14:1] Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group an

[orientdb] Re: Access JSON parameters inside Javascript fuction

2015-06-25 Thread alessandrorota04
Hi Norman, if you try with broswe you can get only the value Norman Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to orient-database+unsubscr...@goo

[orientdb] Re: Access JSON parameters inside Javascript fuction

2015-06-25 Thread alessandrorota04
Hi Norman, if you try with broswe you can get only the value Norman Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubs

[orientdb] Re: Access JSON parameters inside Javascript fuction

2015-06-25 Thread alessandrorota04
Hi Norman, I think that being the format JSON, when you return the object you will have also the fields @type and @version. Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails f

[orientdb] Re: How to modify a LINKSET after initial vertex creation

2015-06-25 Thread alessandrorota04
Hi Bill, I try the query from the browse in Visual Studio and it works. Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to orient-database+unsubscr...

[orientdb] Re: How to modify a LINKSET after initial vertex creation

2015-06-26 Thread alessandrorota04
Hi, I have tried with version (2.1 rc4) and the query works ( see attached) Alessandro

[orientdb] Re: Access JSON parameters inside Javascript fuction

2015-06-26 Thread alessandrorota04
Hi Norman, try this function with the parameter record {"from_rid": "#12:0","to_rid": "12:1", "edge_type": "friend","edge_properties":{"property1":"value_property", "property2":"value2_property"}} var obj = JSON.parse(record); var ridFrom= obj.from_rid; var ridTo = obj.to_rid; var edge_type= o

[orientdb] Re: select custom function in graph.command

2015-06-29 Thread alessandrorota04
Hi Bryan, I'm sorry if I have not responded more. I have tried several times and the function getBestReply works correctly from Studio but when the function is called from java api don't work. Alessandro -- --- You received this message because you are subscribed to the Google Groups "Orient

[orientdb] Re: How to store JSON - as object or string?

2015-06-29 Thread alessandrorota04
Hi Joao, this is an example of code for Embedded List from java api OrientGraph g=new OrientGraph(currentPath); OClass cl=g.createVertexType("Person", "V"); cl.createProperty("name", OType.STRING); cl.createProperty("lista", OType.EMBEDDEDLIST); List lista1=new ArrayList(); lista1.add(new Auto("F

[orientdb] Re: Studio: insertion with nidation

2015-06-29 Thread alessandrorota04
Hi Marco, I use orientdb-2.1-rc4 and I have defined this schema and I have try these queries

[orientdb] Re: select custom function in graph.command

2015-06-30 Thread alessandrorota04
Hi Bryan, I think that is a bug and I don't know how to solve the problem. Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to orient-database+unsubscr

[orientdb] Re: year: property or vertex?

2015-07-01 Thread alessandrorota04
Hi Dennis, I think that a standard approach of having a "year" property for each node and searching with a "where" clause is better, so you avoid to have all the links. Regards, Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To

[orientdb] Re: Difference between graph shutdown and graph drop?

2015-07-02 Thread alessandrorota04
Hi, you can use the graph.shutdown() when you want to release the OrientGraph instance. Regards, Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to o

[orientdb] Re: "where in.@rid = someRID" does not work but "where someRID in in.@rid" works, why?

2015-07-06 Thread alessandrorota04
Hi, you can use: select from User where in().@rid contains #12:2 select from User where in().@class contains "token" Regards, Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving email

[orientdb] Re: Update edge property

2015-07-14 Thread alessandrorota04
Hi, try this example update #18:0 set name='newName' Regards, Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to orient-database+unsubscr...@googlegro

[orientdb] Re: Time Series Java API example

2015-07-14 Thread alessandrorota04
Hi Simon, of course you can add a new log to a certain hour After create the log insert into log(priority) values ('very high') you can update the hour and add the log that you have created update #12:0 add logs= [#11:4] #12:0 is the rid of the hour #11:4 is the rid of the log Regards, Alessa

[orientdb] Re: Update edge property

2015-07-14 Thread alessandrorota04
Hi, you must use clause "in" because "select inE() from where @rid = #13:0" returns a collection. Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to

[orientdb] Re: Exponential Format to use for Double and Float data types?

2015-07-17 Thread alessandrorota04
Hi Bill, I have tried these query : insert into Number(val) values("1.27e+23") insert into Number(val) values("1.23e+23") select sum(val) from Number I think that you must insert the values like string If you try "insert into Number(val) values("1.27x+23")" you have a NumberFormatException Rega

[orientdb] Re: Curious about Time Series Use Case

2015-07-20 Thread alessandrorota04
Hi Eric, the query would be something like : SELECT expand(out('haveMonth')[month=3].out('haveDay')[day=20].out('haveHour')[hour=10].out('haveLogs')) FROM Year WHERE year = "2012" Regards, Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientD

[orientdb] Re: insert as select nested json problem

2015-07-20 Thread alessandrorota04
Hi Anton, try this function with the parameter message {"id": "123", "text": "aaa", "user": [{"id": "200", "name": "bbb"},{ "id": "201", "name": "ccc"}]} var obj = JSON.parse(message); var user=obj.user; var g=orient.getGraph(); for(i=0;ihttps://groups.google.com/d/optout.

[orientdb] Re: Problems parsing OrientDB sql commands with nested quotes ?

2015-07-20 Thread alessandrorota04
Hi Athanassios, you have a problem if you use ' because of text "Wong Kar Wai's" that contains '. Regards, Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an e

[orientdb] Re: Curious about Time Series Use Case

2015-07-21 Thread alessandrorota04
Hi Eric, the query SELECT expand(out('haveMonth')[month=3].out('haveDay')[day=20].out('haveHour')[hour>=10 and hour<=20].out('haveLogs')) FROM Year WHERE year = "2012" should work. Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group

[orientdb] Re: Curious about Time Series Use Case

2015-07-21 Thread alessandrorota04
Hi, I'm using version 2.0.12 and I have problem with > in the code [hour>=10 and hour<=20] I solved the problem with the following query: select expand(out('haveLog')) from (SELECT expand(out('haveMonth')[month=3].out('haveDay')[day=20].out('haveHour')) FROM Year WHERE year = "2012") where hour>

[orientdb] Re: Curious about Time Series Use Case

2015-07-22 Thread alessandrorota04
Hi, at this link http://orientdb.com/orientdb-improved-sql-filtering/ I have founded Squared brackets [] allow to: - filtering by one index, example out()[0] - filtering by multiple indexes, example out()[0,2,4] - filtering by ranges, example out()[0-9] - filtering by equal conditions (only equ

[orientdb] Re: How to determine full path with multiple starting points?

2015-07-22 Thread alessandrorota04
Hi Gary, if you want to get the path you can use this query: select $path from (traverse in() from [ ]) Regards, Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, sen

[orientdb] Re: GROUP BY not working as expected

2015-07-27 Thread alessandrorota04
Hi Ivan, try this query select stat, sum(val) as val from ( select mea.s as stat, mea.v as val from ( select mea from Measurement where @rid=#12:0 unwind mea )) group by stat Regards, Al

[orientdb] Re: OETL import: Is there any way to import EmbeddedMap

2015-07-27 Thread alessandrorota04
Hi Alex, I have solved the problem so: 1) this is the column "val" in the .csv 2) this is the column val in my db

[orientdb] Re: What is the proper way to read only one elementh of Embedded list?

2015-07-28 Thread alessandrorota04
Hi, you can not read the entire list. To read the last item uses your code List list=(List) document.field("AdresList"); System.out.println(list.get(list.size()-1)); while to read the i-th element you can use System.out.println(list.get(i)); Regards, Alessandro -- --- You received this messag

[orientdb] Re: OETL import: Is there any way to import EmbeddedMap

2015-07-28 Thread alessandrorota04
Hi Alex, can you send me your file .json ? Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to orient-database+unsubscr...@googlegroups.com. For more o

[orientdb] Re: What is the proper way to read only one elementh of Embedded list?

2015-07-28 Thread alessandrorota04
Hi, to read the last item you can use Iterable result=db.command(new OSQLSynchQuery("select last(AdresList) as last from Person")).execute(); for(ODocument v:result){ System.out.println(v.field("last")); } Alessandro -- --- You received this message because you are subscribed to the Google Gr

[orientdb] Re: What is the proper way to read only one elementh of Embedded list?

2015-07-28 Thread alessandrorota04
Hi, if you want to get the i-th element try this code: int i=5; String query="select AdresList["+i+"] as item from Person"; Iterable result5=db.command(new OSQLSynchQuery(query)).execute(); for(ODocument v:result5){ System.out.println(v.field("item")); } Regards, Alessandro -- --- You receiv

[orientdb] Re: #URGENT #ETL #LINK #LIGHTWEIGHT_EDGES #BIDIRECTIONAL_REFERENCE

2015-07-28 Thread alessandrorota04
Hi, I did not manage to create a bi-directional lightweight with .json configuration by using ETL. If you want you can create the link from the class A to the class B using ETL and after you can use this javascript function to create the edges from B to A. var g=orient.getGraph(); var b=g.comman

[orientdb] Re: SQL last edge

2015-07-29 Thread alessandrorota04
Hi Simon, you can use this query select expand(last(out('book_has_author'))) from Book Regards, Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to or

[orientdb] Re: Java Tinkerpop method dropDatabase() with iDatabaseName parameter

2015-07-29 Thread alessandrorota04
Hi Daniel, look at the chapter Drop Database at this link http://orientdb.com/docs/last/Server-Management-Java.html or https://code.google.com/p/orient/wiki/ServerManagementJava You must specify the storage name in dropDatabase method. public OServerAdmin dropDatabase(String storageType) throws

[orientdb] Re: ETL: import csv without dividing table

2015-07-29 Thread alessandrorota04
Hi, can you post the schema of your classes ? Regards, Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to orient-database+unsubscr...@googlegroups.com

[orientdb] Re: ETL: import csv without dividing table

2015-07-29 Thread alessandrorota04
Hi Nicolas, I think that is not possible with ETL. Attached You can find the java code for what you need. Regards, Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, s

[orientdb] Re: Can't get a query with CONTAINSALL to work

2015-07-30 Thread alessandrorota04
Hi, This example should help : select from Person where children contains ( married = true ) // select people who have at least one child with married = true select from Person where children containsAll ( married = true ) // select people who have all the children with married = true Regards, A

[orientdb] Re: error when creating edges

2015-07-31 Thread alessandrorota04
Hi Jenica, I think that you can not create vertices and edges joining the vertices that you are creating at the time by the same .csv. For example in the first line of the CSV file you want to attach the vertex with CHR13: 20187463 that does not exist. You can use this javaScript function by co

[orientdb] Re: Get the class heirarchy of a vertex

2015-07-31 Thread alessandrorota04
Hi Chris, can you send me your schema ? Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to orient-database+unsubscr...@googlegroups.com. For more opti

[orientdb] Re: Can't get a query with CONTAINSALL to work

2015-07-31 Thread alessandrorota04
Hi, you can use this query: select from Person where $parents containsAll (@rid in $current.in_Child) and $parents.size() = in('Child').size() and @rid<>#11:3 let $parents= (select expand(in('Child')) from #11:3) Regards, Alessandro -- --- You received this message because you are subscribed

[orientdb] Re: UPDATE Array Value

2015-08-04 Thread alessandrorota04
Hi Michael, I have the same problem I created a function javascript or java code to solve the problem JavaScript function : parameter = "i" and "newValue" var g=orient.getGraph(); var b=g.command('sql','select from model'); var values="["; for(j=0;j=0){ data.set(i,newValue); for(k=0;khttp

[orientdb] Re: attribute value history

2015-08-04 Thread alessandrorota04
Hi, I think that if you have a lot of information to be stored in your node might be much better then having "delta" nodes connected to the main node, otherwise if you have to keep in memory one field you could use a embeddedlist and add the old values time to time. Regards, Alessandro -- ---

[orientdb] Re: UPDATE Array Value

2015-08-05 Thread alessandrorota04
Hi Michael, try this code: Javascript: var g=orient.getGraph(); var b=g.command('sql','select from model'); var values="["; for(j=0;j=0){ data.set(i,newValue); var newData=data.toString().replace("[","['").replace(", ", "', '").replace("]","']"); var query="update model set data = "

[orientdb] Re: delete vertex not working with out where

2015-08-10 Thread alessandrorota04
Hi, if you want to delete all vertexes of a class use this command " truncate class MyClass unsafe" Regards, Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an

[orientdb] Re: delete vertex not working with out where

2015-08-10 Thread alessandrorota04
Hi, try to use "DELETE VERTEX MyVertex LIMIT 100". Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to orient-database+unsubscr...@googlegroups.com. Fo

[orientdb] Re: delete vertex not working with out where

2015-08-10 Thread alessandrorota04
Hi, try to use "DELETE VERTEX MyVertex LIMIT 100" instead of "DELETE VERTEX MyVertex BATCH 100". Alessandro -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to o

[orientdb] Re: Orient DB :OSQLSynchQuery

2015-08-11 Thread alessandrorota04
Hi, I try your code and I think that the problem is "(Iterable) txGraph.command(cmd1).execute()". When you use this instruction for the first time it works, but if you use it a second time it doesn't works. Try using the command once and convert Iterable in List and after you use only the list.

[orientdb] Re: Aggregating weights, and random walk

2015-08-11 Thread alessandrorota04
Hi Josh, for the second question you can use a server-side function like this var g=orient.getGraph(); var query="select name, sum(weigth) from (select weigth,inV().name as name from (select expand(outE('metadata_of'))"; query+=" from (select from Document where name in " + names + " ))) group

[orientdb] Re: Aggregating weights, and random walk

2015-08-12 Thread alessandrorota04
Hi Josh, I did not understand your first question, can you explain what you want to achieve ? What you mean by "centrality of the metadata" ? Your structure is like that in Figure 1 or such as that in Figure 2, or neither ?

[orientdb] Re: delete vertex not working with out where

2015-08-12 Thread alessandrorota04
Hi, I tried to cancel 3,000,000 of vertices with this java code and I had no problems. for(int j=0;j<3;j++){ g.command(new OCommandSQL("DELETE VERTEX MyVertex LIMIT 100")).execute(); g.commit(); } Let me know how it goes. Regards, Alessandro. -- --- You received this message because you

  1   2   3   4   >