Re: [orientdb] What does this crc check is failed error mean?

2014-08-09 Thread Andrey Lomakin
Hi, you should not typical worry about it, we have 2 master records in
operation log, if one is broken second one is used.
Usually it only affects data restore after crash and you should worry about
this exception if both master records will be broken.

Master records contain information of position in operation log from which
data should be restored.



On Sat, Aug 9, 2014 at 3:34 AM, Jing Chen jingjing...@gmail.com wrote:

 Hi there,

 I noticed this error in the OrientDB server log today when I was loading
 data to the database:

 2014-08-08 11:09:42:355 SEVE Can not restore 0 WAL master record for
 storage ndex crc check is failed [OWriteAheadLog]

 What does this error mean? Should I worry about the data being loaded? My
 Java application connects to the server through a remote connection and
 insert data to the database through Orientdb Graph API. I didn't get any
 exception from my Java program during the insert. Should this error throw
 an exception in the client?

 Thanks,
 Jing

 --

 ---
 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 options, visit https://groups.google.com/d/optout.




-- 
Best regards,
Andrey Lomakin.

Orient Technologies
the Company behind OrientDB

-- 

--- 
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 options, visit https://groups.google.com/d/optout.


[orientdb] Question on traverse with graph DB

2014-08-09 Thread Jon Fields
Hi, I just learned about and started experimenting with OrientDB (1.7.7 
community) a few days ago. I am very impressed.

I apologize if this is a newbie question, however, I am having trouble 
understanding traverse with a graph DB. Steps:

   1. Create a new plocal graph database
   2. create three vertices: #9:0, #9:1, #9:2 just using create vertex V
   3. create three edges:
  1. create edge E from #9:0 to #9:1
  2. create edge E from #9:1 to #9:2
  3. create edge E from #9:2 to #9:3
   4. select from V:
   +++
   #   |@RID|out_|in_ 
   +++
   0   |#9:0|#9:1|null
   1   |#9:1|#9:2|#9:0
   2   |#9:2|null|#9:1
   +++
   
   5. traverse V.out, E.in from #9:0
   ++
   #   |@RID|out_
   ++
   0   |#9:0|#9:1
   ++
   
   

*I would have expected the traversal to return all three vertices. Why is 
   that not the case? *
   6. traverse * from #9:0
   +++
   #   |@RID|out_|in_ 
   +++
   0   |#9:0|#9:1|null
   1   |#9:1|#9:2|#9:0
   2   |#9:2|null|#9:1
   +++
   
   Thank you for your help! - Jon
   

-- 

--- 
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 options, visit https://groups.google.com/d/optout.


Re: [orientdb] Re: [Java API] Indexing properties and then retrieve using Indexing.

2014-08-09 Thread Luca Garulli
Hi Gerald,
GraphAPI uses that convention since long time. If you're interested to this
feature, can you open a new issue?

Lvc@


On 18 July 2014 17:28, Gerard Solé gerard.sole.castel...@gmail.com wrote:

 Hi again!

 I've realised that I cannot use a different index name. If my *class *is
 *A3User* my index name must be *A3User.id* it can't have a different name
 as (A3UserIdx), beacuse the internal funcion uses the dot as a separator to
 obtain the classname and then call de DB to get that class.

 There are other ways to do this?

 Thanks in advanced!

 Gerard.

 El divendres 18 de juliol de 2014 16:39:45 UTC+2, Gerard Solé va escriure:

 Hi,

 I'm trying to index some properties of a subclass of a Vertex (from now,
 A3User). To create the index I call the following methods:

 user.createIndex(A3UserIdx.id, OClass.INDEX_TYPE.UNIQUE_HASH_INDEX,
 User.ID);

 user.createIndex(A3UserIdx.email, OClass.INDEX_TYPE.UNIQUE_HASH_INDEX,
 User.EMAIL);


 Basically, I set has UNIQUE the ID and EMAIL of a user. I saw that
 passing multiple properties on a unique type index requires that all of
 that properties need to be unique at the same time, so repeating an id or
 an email, but not both of them it's count as Unique.

 Then, I want to retrieve a node from that index, and as I know that the
 ID or the EMAIL will be unique, I want to call the index to give me a
 single A3User or at least a list of A3Users which should only be one object.

 To call this Index I'm trying to use two different functions, both of
 them return null, and I'm not finding any solution to this problem, so I
 don't know exactly what I'm doing it wrong. (In OrientDB studio the index
 seems to be properly created). In studio it is written as:

 http://i.imgur.com/LGhcxfj.png

 Methods that return null:

 String *idxProp *= userId.contains(@)? A3UserIdx.id
 : A3UserIdx.email;

 IndexVertex idxV = graph.getIndex(*idxProp*, Vertex.class);

 graph.getVertices(*idxProp*, userId)



  --

 ---
 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 options, visit https://groups.google.com/d/optout.


-- 

--- 
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 options, visit https://groups.google.com/d/optout.


Re: [orientdb] Re: OrientDB and Grails

2014-08-09 Thread Emrul Islam
Luca,

I did some research on this exact choice for OrientDB and can summarise as 
follows:
1. JavaCC seems to be quite established and there's a rather complete SQL 
parser written for it (originating from IBM and Informix, passing to Akiban 
and now part of FoundationDB)  https://github.com/FoundationDB/sql-parser - 
it could be a solid starting point
2. JavaCC seems to lack documentation so for people unfamiliar with writing 
parsers it could be very difficult
3. ANTLR is very modern, has many nice features and there's a comprehensive 
book from the author that explains many aspects of writing parsers.
4. An ANTLR parser was started for OrientDB already so was also a good 
starting point.

In my attempt I used ANTLR (and Jonathan Sorel's starting point) but just 
was not able to complete the task.

Ultimately, I'm a pragmatist and have concluded that actually the 
underlying parser library doesn't matter.  I couldn't find any technical 
pro or con other than my opinion that ANTLR seems a bit cleaner and easier 
to understand.

So, if you hire a parser expert then probably using the 
IBM/Informix/Akiban/FoundationDB parser code as a starting point will get 
the job done faster.  If you hire someone less familiar with parsers then 
ANTLR will probably be easier and will likely be something the Open Source 
community can manage better,

Just my thoughts, I hope they help in your evaluation.

Best,

Emrul

On Friday, August 8, 2014 9:39:27 AM UTC+1, Lvc@ wrote:

 Hi Emrul,
 The total rewriting of SQL parser has been scheduled for 2.1. We're taking 
 the decision about JavaCC or ANTLR. Pros and Cons of both.

 Anybody has an opinion on both?

 Lvc@



 On 8 August 2014 01:34, Emrul Islam em...@emrul.com javascript: wrote:

 Hi Fidel,

 I had done some work to write a GORM plugin for OrientDB that would allow 
 Grails to directly persist domain objects into OrientDB.  However, I had to 
 pause the effort while I waited for a better query API (instead of 
 constructing an SQL string I wanted to programmatically express a query). 
  I shifted my attention to the ANTLR Parser effort but ran out of time.

 So I have two choices: either finish the ANTLR parser for OrientDB and 
 then finish the Grails plugin or work on constructing an SQL string for 
 queries.  I haven't really thought about it in the past few months because 
 I was working on other things.

 You can still directly call OrientDB just as you can any Java library 
 from Grails, I tested this approach and it worked fine but it means 
 managing your own serialization between OrientDB records and grails domain 
 classes.

 Good luck in your efforts!

 On Monday, August 4, 2014 5:22:40 PM UTC+1, Fidel Viegas wrote:

 Hello, everyone!

 I have been playing around with orientdb and i would like to put 
 together a small application using grails and was wondering if anyone has 
 worked with grails and orientdb that would like to share his experience. Is 
 there any driver for grails ou there? How could one integrate the java 
 driver?

 I look forward to hearing from those that have some advice with regards 
 to this combo.

 Thanks in advance!

 Best Regards,

 Fidel H Viegas

  -- 

 --- 
 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-databa...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/d/optout.




-- 

--- 
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 options, visit https://groups.google.com/d/optout.


Re: [orientdb] Re: OrientDB and Grails

2014-08-09 Thread Luca Garulli
Hi Emrul,
Thanks for your feedback. I'll forward it to the guy ;-)

Lvc@


On 9 August 2014 17:25, Emrul Islam em...@emrul.com wrote:

 Luca,

 I did some research on this exact choice for OrientDB and can summarise as
 follows:
 1. JavaCC seems to be quite established and there's a rather complete SQL
 parser written for it (originating from IBM and Informix, passing to Akiban
 and now part of FoundationDB)  https://github.com/FoundationDB/sql-parser
 - it could be a solid starting point
 2. JavaCC seems to lack documentation so for people unfamiliar with
 writing parsers it could be very difficult
 3. ANTLR is very modern, has many nice features and there's a
 comprehensive book from the author that explains many aspects of writing
 parsers.
 4. An ANTLR parser was started for OrientDB already so was also a good
 starting point.

 In my attempt I used ANTLR (and Jonathan Sorel's starting point) but just
 was not able to complete the task.

 Ultimately, I'm a pragmatist and have concluded that actually the
 underlying parser library doesn't matter.  I couldn't find any technical
 pro or con other than my opinion that ANTLR seems a bit cleaner and easier
 to understand.

 So, if you hire a parser expert then probably using the
 IBM/Informix/Akiban/FoundationDB parser code as a starting point will get
 the job done faster.  If you hire someone less familiar with parsers then
 ANTLR will probably be easier and will likely be something the Open Source
 community can manage better,

 Just my thoughts, I hope they help in your evaluation.

 Best,

 Emrul


 On Friday, August 8, 2014 9:39:27 AM UTC+1, Lvc@ wrote:

 Hi Emrul,
 The total rewriting of SQL parser has been scheduled for 2.1. We're
 taking the decision about JavaCC or ANTLR. Pros and Cons of both.

 Anybody has an opinion on both?

 Lvc@



 On 8 August 2014 01:34, Emrul Islam em...@emrul.com wrote:

 Hi Fidel,

 I had done some work to write a GORM plugin for OrientDB that would
 allow Grails to directly persist domain objects into OrientDB.  However, I
 had to pause the effort while I waited for a better query API (instead of
 constructing an SQL string I wanted to programmatically express a query).
  I shifted my attention to the ANTLR Parser effort but ran out of time.

 So I have two choices: either finish the ANTLR parser for OrientDB and
 then finish the Grails plugin or work on constructing an SQL string for
 queries.  I haven't really thought about it in the past few months because
 I was working on other things.

 You can still directly call OrientDB just as you can any Java library
 from Grails, I tested this approach and it worked fine but it means
 managing your own serialization between OrientDB records and grails domain
 classes.

 Good luck in your efforts!

 On Monday, August 4, 2014 5:22:40 PM UTC+1, Fidel Viegas wrote:

 Hello, everyone!

 I have been playing around with orientdb and i would like to put
 together a small application using grails and was wondering if anyone has
 worked with grails and orientdb that would like to share his experience. Is
 there any driver for grails ou there? How could one integrate the java
 driver?

 I look forward to hearing from those that have some advice with regards
 to this combo.

 Thanks in advance!

 Best Regards,

 Fidel H Viegas

  --

 ---
 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-databa...@googlegroups.com.

 For more options, visit https://groups.google.com/d/optout.


  --

 ---
 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 options, visit https://groups.google.com/d/optout.


-- 

--- 
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 options, visit https://groups.google.com/d/optout.


Re: [orientdb] Re: OrientDB and Grails

2014-08-09 Thread Fidel H Viegas
Hi Luca and Emrul!

I am familiar with all three of them: JavaCC, ANTLR (back when it was only
PCCTS) and SableCC. I have written a backend for SableCC that generates
Python code, that is the one I am more familiar with as I know the
internals. JavaCC generates LL(1) parsers, SableCC generates LALR(1)
parsers, similar to Yacc, and ANTLR generates LL(K) parsers. I work mostly
with SableCC, because I work a lot with Python, and use the backend
implemented by me. However, I would suggest going with the newer version of
ANTLR and starting, perhaps, with the grammar for Sqlite found here
https://github.com/antlr/grammars-v4. SableCC was working on a newer
version, supposed to be version 4 that would allow several backends, but
the project does not seem to have much activity based on that version. I am
still using a modified version of SableCC 3 that has a language to generate
the backends. I implemented the Python backend and was interested in
implementing the backend for SableCC 4, but I don't really see much
activity there. Now, as for ANTLR there seems to be a lot of progress, as
we keep seeing versions coming out. Terrence Parr is continuously working
on it and there's a lot of support for other languages as well.

Emrul, is your project available in any repository you could share? I would
be interested in seeing the code, and if I find some time I could probably
give you a hand.

Regards,

Fidel H Viegas



On Sat, Aug 9, 2014 at 4:52 PM, Luca Garulli l.garu...@gmail.com wrote:

 Hi Emrul,
 Thanks for your feedback. I'll forward it to the guy ;-)

 Lvc@


 On 9 August 2014 17:25, Emrul Islam em...@emrul.com wrote:

 Luca,

 I did some research on this exact choice for OrientDB and can summarise
 as follows:
 1. JavaCC seems to be quite established and there's a rather complete SQL
 parser written for it (originating from IBM and Informix, passing to Akiban
 and now part of FoundationDB)  https://github.com/FoundationDB/sql-parser
 - it could be a solid starting point
 2. JavaCC seems to lack documentation so for people unfamiliar with
 writing parsers it could be very difficult
 3. ANTLR is very modern, has many nice features and there's a
 comprehensive book from the author that explains many aspects of writing
 parsers.
 4. An ANTLR parser was started for OrientDB already so was also a good
 starting point.

 In my attempt I used ANTLR (and Jonathan Sorel's starting point) but just
 was not able to complete the task.

 Ultimately, I'm a pragmatist and have concluded that actually the
 underlying parser library doesn't matter.  I couldn't find any technical
 pro or con other than my opinion that ANTLR seems a bit cleaner and easier
 to understand.

 So, if you hire a parser expert then probably using the
 IBM/Informix/Akiban/FoundationDB parser code as a starting point will get
 the job done faster.  If you hire someone less familiar with parsers then
 ANTLR will probably be easier and will likely be something the Open Source
 community can manage better,

 Just my thoughts, I hope they help in your evaluation.

 Best,

 Emrul


 On Friday, August 8, 2014 9:39:27 AM UTC+1, Lvc@ wrote:

 Hi Emrul,
 The total rewriting of SQL parser has been scheduled for 2.1. We're
 taking the decision about JavaCC or ANTLR. Pros and Cons of both.

 Anybody has an opinion on both?

 Lvc@



 On 8 August 2014 01:34, Emrul Islam em...@emrul.com wrote:

 Hi Fidel,

 I had done some work to write a GORM plugin for OrientDB that would
 allow Grails to directly persist domain objects into OrientDB.  However, I
 had to pause the effort while I waited for a better query API (instead of
 constructing an SQL string I wanted to programmatically express a query).
  I shifted my attention to the ANTLR Parser effort but ran out of time.

 So I have two choices: either finish the ANTLR parser for OrientDB and
 then finish the Grails plugin or work on constructing an SQL string for
 queries.  I haven't really thought about it in the past few months because
 I was working on other things.

 You can still directly call OrientDB just as you can any Java library
 from Grails, I tested this approach and it worked fine but it means
 managing your own serialization between OrientDB records and grails domain
 classes.

 Good luck in your efforts!

 On Monday, August 4, 2014 5:22:40 PM UTC+1, Fidel Viegas wrote:

 Hello, everyone!

 I have been playing around with orientdb and i would like to put
 together a small application using grails and was wondering if anyone has
 worked with grails and orientdb that would like to share his experience. 
 Is
 there any driver for grails ou there? How could one integrate the java
 driver?

 I look forward to hearing from those that have some advice with
 regards to this combo.

 Thanks in advance!

 Best Regards,

 Fidel H Viegas

  --

 ---
 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: Question on traverse with graph DB

2014-08-09 Thread Jon Fields
After looking at the results of select from V and seeing out_ and in_ 
instead of out and in I tried this:

 traverse V.out_, E.in_ from #9:0

and it did traverse all the outgoing vertices. However, all the 
documentation that I have read refers to V.out, E.in.

What have I missed? Again I'm using 1.7.7 community

Thanks!

On Saturday, August 9, 2014 9:09:04 AM UTC-4, Jon Fields wrote:

 Hi, I just learned about and started experimenting with OrientDB (1.7.7 
 community) a few days ago. I am very impressed.

 I apologize if this is a newbie question, however, I am having trouble 
 understanding traverse with a graph DB. Steps:

1. Create a new plocal graph database
2. create three vertices: #9:0, #9:1, #9:2 just using create vertex V
3. create three edges:
   1. create edge E from #9:0 to #9:1
   2. create edge E from #9:1 to #9:2
   3. create edge E from #9:2 to #9:3
4. select from V:
+++
#   |@RID|out_|in_ 
+++
0   |#9:0|#9:1|null
1   |#9:1|#9:2|#9:0
2   |#9:2|null|#9:1
+++

5. traverse V.out, E.in from #9:0
++
#   |@RID|out_
++
0   |#9:0|#9:1
++



 *I would have expected the traversal to return all three vertices. Why is 
that not the case? *
6. traverse * from #9:0
+++
#   |@RID|out_|in_ 
+++
0   |#9:0|#9:1|null
1   |#9:1|#9:2|#9:0
2   |#9:2|null|#9:1
+++

Thank you for your help! - Jon



-- 

--- 
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 options, visit https://groups.google.com/d/optout.


Re: [orientdb] Re: OrientDB and Grails

2014-08-09 Thread Fidel H Viegas
I visited ANTLR website once again, and just noticed that Hibernate's HQL
language was implemented in ANTLR (http://www.antlr.org/about.html)

Perhaps that would be a good choice, I guess.

Regards,

Fidel H Viegas


On Sat, Aug 9, 2014 at 5:37 PM, Fidel H Viegas fidel.vie...@gmail.com
wrote:

 Hi Luca and Emrul!

 I am familiar with all three of them: JavaCC, ANTLR (back when it was only
 PCCTS) and SableCC. I have written a backend for SableCC that generates
 Python code, that is the one I am more familiar with as I know the
 internals. JavaCC generates LL(1) parsers, SableCC generates LALR(1)
 parsers, similar to Yacc, and ANTLR generates LL(K) parsers. I work mostly
 with SableCC, because I work a lot with Python, and use the backend
 implemented by me. However, I would suggest going with the newer version of
 ANTLR and starting, perhaps, with the grammar for Sqlite found here
 https://github.com/antlr/grammars-v4. SableCC was working on a newer
 version, supposed to be version 4 that would allow several backends, but
 the project does not seem to have much activity based on that version. I am
 still using a modified version of SableCC 3 that has a language to generate
 the backends. I implemented the Python backend and was interested in
 implementing the backend for SableCC 4, but I don't really see much
 activity there. Now, as for ANTLR there seems to be a lot of progress, as
 we keep seeing versions coming out. Terrence Parr is continuously working
 on it and there's a lot of support for other languages as well.

 Emrul, is your project available in any repository you could share? I
 would be interested in seeing the code, and if I find some time I could
 probably give you a hand.

 Regards,

 Fidel H Viegas



 On Sat, Aug 9, 2014 at 4:52 PM, Luca Garulli l.garu...@gmail.com wrote:

 Hi Emrul,
 Thanks for your feedback. I'll forward it to the guy ;-)

 Lvc@


 On 9 August 2014 17:25, Emrul Islam em...@emrul.com wrote:

 Luca,

 I did some research on this exact choice for OrientDB and can summarise
 as follows:
 1. JavaCC seems to be quite established and there's a rather complete
 SQL parser written for it (originating from IBM and Informix, passing to
 Akiban and now part of FoundationDB)
 https://github.com/FoundationDB/sql-parser - it could be a solid
 starting point
 2. JavaCC seems to lack documentation so for people unfamiliar with
 writing parsers it could be very difficult
 3. ANTLR is very modern, has many nice features and there's a
 comprehensive book from the author that explains many aspects of writing
 parsers.
 4. An ANTLR parser was started for OrientDB already so was also a good
 starting point.

 In my attempt I used ANTLR (and Jonathan Sorel's starting point) but
 just was not able to complete the task.

 Ultimately, I'm a pragmatist and have concluded that actually the
 underlying parser library doesn't matter.  I couldn't find any technical
 pro or con other than my opinion that ANTLR seems a bit cleaner and easier
 to understand.

 So, if you hire a parser expert then probably using the
 IBM/Informix/Akiban/FoundationDB parser code as a starting point will get
 the job done faster.  If you hire someone less familiar with parsers then
 ANTLR will probably be easier and will likely be something the Open Source
 community can manage better,

 Just my thoughts, I hope they help in your evaluation.

 Best,

 Emrul


 On Friday, August 8, 2014 9:39:27 AM UTC+1, Lvc@ wrote:

 Hi Emrul,
 The total rewriting of SQL parser has been scheduled for 2.1. We're
 taking the decision about JavaCC or ANTLR. Pros and Cons of both.

 Anybody has an opinion on both?

 Lvc@



 On 8 August 2014 01:34, Emrul Islam em...@emrul.com wrote:

 Hi Fidel,

 I had done some work to write a GORM plugin for OrientDB that would
 allow Grails to directly persist domain objects into OrientDB.  However, I
 had to pause the effort while I waited for a better query API (instead of
 constructing an SQL string I wanted to programmatically express a query).
  I shifted my attention to the ANTLR Parser effort but ran out of time.

 So I have two choices: either finish the ANTLR parser for OrientDB and
 then finish the Grails plugin or work on constructing an SQL string for
 queries.  I haven't really thought about it in the past few months because
 I was working on other things.

 You can still directly call OrientDB just as you can any Java library
 from Grails, I tested this approach and it worked fine but it means
 managing your own serialization between OrientDB records and grails domain
 classes.

 Good luck in your efforts!

 On Monday, August 4, 2014 5:22:40 PM UTC+1, Fidel Viegas wrote:

 Hello, everyone!

 I have been playing around with orientdb and i would like to put
 together a small application using grails and was wondering if anyone has
 worked with grails and orientdb that would like to share his experience. 
 Is
 there any driver for grails ou there? How could one integrate the java
 driver?

 I 

Re: [orientdb] Re: OrientDB and Grails

2014-08-09 Thread Curtis Ruck
I've used antlr 3  4, and the changes in 4 make it extremely easy to use,
within the scope of parsing grammars. The only benefit to javacc that I'm
aware of is the lack of a runtime dependency, but I believe the flexibility
during grammar development more than makes up for it since the antlr
license is friendly.


--
Curtis Ruck
Anytime: 210-857-1126


On Sat, Aug 9, 2014 at 12:52 PM, Fidel H Viegas fidel.vie...@gmail.com
wrote:

 I visited ANTLR website once again, and just noticed that Hibernate's HQL
 language was implemented in ANTLR (http://www.antlr.org/about.html)

 Perhaps that would be a good choice, I guess.

 Regards,

 Fidel H Viegas


 On Sat, Aug 9, 2014 at 5:37 PM, Fidel H Viegas fidel.vie...@gmail.com
 wrote:

 Hi Luca and Emrul!

 I am familiar with all three of them: JavaCC, ANTLR (back when it was
 only PCCTS) and SableCC. I have written a backend for SableCC that
 generates Python code, that is the one I am more familiar with as I know
 the internals. JavaCC generates LL(1) parsers, SableCC generates LALR(1)
 parsers, similar to Yacc, and ANTLR generates LL(K) parsers. I work mostly
 with SableCC, because I work a lot with Python, and use the backend
 implemented by me. However, I would suggest going with the newer version of
 ANTLR and starting, perhaps, with the grammar for Sqlite found here
 https://github.com/antlr/grammars-v4. SableCC was working on a newer
 version, supposed to be version 4 that would allow several backends, but
 the project does not seem to have much activity based on that version. I am
 still using a modified version of SableCC 3 that has a language to generate
 the backends. I implemented the Python backend and was interested in
 implementing the backend for SableCC 4, but I don't really see much
 activity there. Now, as for ANTLR there seems to be a lot of progress, as
 we keep seeing versions coming out. Terrence Parr is continuously working
 on it and there's a lot of support for other languages as well.

 Emrul, is your project available in any repository you could share? I
 would be interested in seeing the code, and if I find some time I could
 probably give you a hand.

 Regards,

 Fidel H Viegas



 On Sat, Aug 9, 2014 at 4:52 PM, Luca Garulli l.garu...@gmail.com wrote:

 Hi Emrul,
 Thanks for your feedback. I'll forward it to the guy ;-)

 Lvc@


 On 9 August 2014 17:25, Emrul Islam em...@emrul.com wrote:

 Luca,

 I did some research on this exact choice for OrientDB and can summarise
 as follows:
 1. JavaCC seems to be quite established and there's a rather complete
 SQL parser written for it (originating from IBM and Informix, passing to
 Akiban and now part of FoundationDB)
 https://github.com/FoundationDB/sql-parser - it could be a solid
 starting point
 2. JavaCC seems to lack documentation so for people unfamiliar with
 writing parsers it could be very difficult
 3. ANTLR is very modern, has many nice features and there's a
 comprehensive book from the author that explains many aspects of writing
 parsers.
 4. An ANTLR parser was started for OrientDB already so was also a good
 starting point.

 In my attempt I used ANTLR (and Jonathan Sorel's starting point) but
 just was not able to complete the task.

 Ultimately, I'm a pragmatist and have concluded that actually the
 underlying parser library doesn't matter.  I couldn't find any technical
 pro or con other than my opinion that ANTLR seems a bit cleaner and easier
 to understand.

 So, if you hire a parser expert then probably using the
 IBM/Informix/Akiban/FoundationDB parser code as a starting point will get
 the job done faster.  If you hire someone less familiar with parsers then
 ANTLR will probably be easier and will likely be something the Open Source
 community can manage better,

 Just my thoughts, I hope they help in your evaluation.

 Best,

 Emrul


 On Friday, August 8, 2014 9:39:27 AM UTC+1, Lvc@ wrote:

 Hi Emrul,
 The total rewriting of SQL parser has been scheduled for 2.1. We're
 taking the decision about JavaCC or ANTLR. Pros and Cons of both.

 Anybody has an opinion on both?

 Lvc@



 On 8 August 2014 01:34, Emrul Islam em...@emrul.com wrote:

 Hi Fidel,

 I had done some work to write a GORM plugin for OrientDB that would
 allow Grails to directly persist domain objects into OrientDB.  However, 
 I
 had to pause the effort while I waited for a better query API (instead of
 constructing an SQL string I wanted to programmatically express a query).
  I shifted my attention to the ANTLR Parser effort but ran out of time.

 So I have two choices: either finish the ANTLR parser for OrientDB
 and then finish the Grails plugin or work on constructing an SQL string 
 for
 queries.  I haven't really thought about it in the past few months 
 because
 I was working on other things.

 You can still directly call OrientDB just as you can any Java library
 from Grails, I tested this approach and it worked fine but it means
 managing your own serialization between OrientDB records and 

Re: [orientdb] Re: OrientDB and Grails

2014-08-09 Thread Fidel H Viegas
On Sat, Aug 9, 2014 at 6:28 PM, Curtis Ruck curtis.r...@gmail.com wrote:

 I've used antlr 3  4, and the changes in 4 make it extremely easy to use,
 within the scope of parsing grammars. The only benefit to javacc that I'm
 aware of is the lack of a runtime dependency, but I believe the flexibility
 during grammar development more than makes up for it since the antlr
 license is friendly.



I haven't played with ANTLR in a while, but I have used antlr 3 last year.
JavaCC on its own without JJTree is not as easy as SableCC or ANTLR with
regards to tree traversals. I tried to use it in a project a couple of
years ago, but dumped it over SableCC due to simplicity. It was faster than
SableCC, though.

What are you guys using at the moment?

Regards,

Fidel H Viegas

-- 

--- 
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 options, visit https://groups.google.com/d/optout.


[orientdb] Link to ODocument corrupted by DB [issue 2660]

2014-08-09 Thread loadedlux
Initially the db saves the contents of tyrionDoc properly after the 
fromJSON method.  However, the query returns a document with modified 
values in the contact field.  Specifically, the contact value included the 
rid of another document, and is replaced by the values of the document but 
no longer contains the rid of the document. It is not clear what is trigger 
the data modification.

import com.orientechnologies.orient.core.record.impl.ODocument;
import com.orientechnologies.orient.core.sql.query.OSQLSynchQuery;
import com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx;
import java.util.List;


class InnerDoc {

public static void main(String[] args) {

ODatabaseDocumentTx db = new ODatabaseDocumentTx(
remote:localhost/amazingorient);
db.open(admin, admin);

ODocument jaimeDoc = new ODocument(PersonTest);
jaimeDoc.field(name, jaime);
jaimeDoc.save();

ODocument tyrionDoc = new ODocument(PersonTest);
tyrionDoc
.fromJSON({\@type\:\d\,\name\:\tyrion\,\emergency_contact\:[{\relationship\:\brother\,\contact\:
+ jaimeDoc.toJSON() + }]});
tyrionDoc.save();

System.out.println(db.load(tyrionDoc.getIdentity()).toJSON());

ListODocument result = db.query(
  new OSQLSynchQueryODocument(select from  + 
tyrionDoc.getIdentity()));

System.out.println(result.get(0).toJSON());
 db.close();

}
}

-- 

--- 
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 options, visit https://groups.google.com/d/optout.


[orientdb] OrientDB as database for Analytics?

2014-08-09 Thread Hristo Stoyanov
Luca, 
We were considering OrientDb for analytical reports for one of our projects.  
Specifically,  the use of window functions,  quite common in high-end SQL 
systems. Eventually we decided to use PostgreSQL, as OrientDB did not have them.

With Java 8 streams and lambda,  however, one may implement this easily,  
without support from OrientDb? 

Are you also considering cubes,  dimensions,  MDX and other BI tools of the 
trade to implement in OrientDb? Maybe you can just provide an OrientDb backend 
for the Mondrian  OLAP server by Pentaho nstead... 


-- 

--- 
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 options, visit https://groups.google.com/d/optout.