Re: [orientdb] Re: sql create edge in java problem

2014-04-01 Thread Luca Garulli
Thanks! I wish all the users help us with documentation like you did ;-) Lvc@ On 1 April 2014 20:52, odbuser wrote: > I've updated the wiki to reflect this: > > https://github.com/orientechnologies/orientdb/wiki/Document-Database#prepared-query > > That's the only reference that I've found.

Re: [orientdb] Re: sql create edge in java problem

2014-04-01 Thread odbuser
I've updated the wiki to reflect this: https://github.com/orientechnologies/orientdb/wiki/Document-Database#prepared-query That's the only reference that I've found. I think this should be documented somewhere in the SQL section. On Tuesday, April 1, 2014 6:07:56 AM UTC-4, Lvc@ wrote: > > Hi,

Re: [orientdb] Re: sql create edge in java problem

2014-04-01 Thread Luca Garulli
Hi, Yes sorry. The parameter replacement is support only on flat SELECT. Lvc@ On 1 April 2014 09:19, odbuser wrote: > Sorry, you are right. I just wrote a simple test and it doesn't look like > variable substitution works for "create". > > None of the following work: > > create edge from :ri

[orientdb] Re: sql create edge in java problem

2014-04-01 Thread odbuser
Sorry, you are right. I just wrote a simple test and it doesn't look like variable substitution works for "create". None of the following work: create edge from :rid1 to :rid2 create edge from ? to ? create edge from ( select from :rid1 ) to ( select from :rid2 ) create edge from ( select from

[orientdb] Re: sql create edge in java problem

2014-03-31 Thread alexander anguiano
the ? work in other queries that i've used. I tried using the names and that doesn't work either. ORecordId mod = new ORecordId(rid1); ORecordId rd = new ORecordId(rid2); Map params = new HashMap(); params.put("rid1", mod); params.put("rid2", rd); request.command(new OCommandSQL("create edge

[orientdb] Re: sql create edge in java problem

2014-03-31 Thread alexander anguiano
Ok, i tried passing the ORecordId like this String rid1 = ... Srtring rid2 =... request.command(new OCommandSQL("create edge MemberOf ? to ?")).execute(new ORecordId(rid1), new ORecordId(rid2)); and now i get this Argument '?' is not a RecordId in form of string. Format must be: : On Mond

[orientdb] Re: sql create edge in java problem

2014-03-31 Thread odbuser
try: create edge MemberOf from :rid1 to :rid2 I haven't tried this with parameter substitution but that would be the correct form if it works. On Monday, March 31, 2014 3:15:09 PM UTC-4, alexander anguiano wrote: > > How do you create an edge using OCommandRequest, > > I'm using 1.6.4 of oriern