Unwanted fields are returned in sql queries from Function

20 views
Skip to first unread message

Ashwini. Kumar

unread,
Jan 15, 2018, 2:21:04 AM1/15/18
to OrientDB
Hi, 
I created a function like this

----
def attractions = orient.getDatabase().query("select @rid, Type, Name from Attractions");
return attractions.getClass();
----

All I was expecting to get back was rid, type and Name.  Instead I am getting a lot of other attributes like @version , @type, @rid, @fieldTypes.


Also, this @rid attribute seems wrong. It starts with a negative number ("#-2:0")

These additional unwanted attributes are complicating my middleware and frontend.   Can we just suppress them at the funtion level?

thanks,
Ashwini

Luigi Dell'Aquila

unread,
Jan 15, 2018, 4:38:16 AM1/15/18
to orient-...@googlegroups.com
Hi Ashwini,

Unfortunately in v 2.2 there is no way to suppress such information (because of how data are processed when sent on the network).
We already addressed this problem in v 3.0, that will be released in a few days. If you want to try it now, you can download the RC1 here http://orientdb.com/orientdb-labs/

Thanks

Luigi

--

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

Ashwini. Kumar

unread,
Jan 15, 2018, 6:58:07 PM1/15/18
to OrientDB
Hi Luigi,

I am infact using v 3.0 that I downloaded from the link you mentioned below. Is there anything special I need to do to suppress these special attributes in the result?  By defualt, it seems that they are all included. 

Thanks,
Ashwini
To unsubscribe from this group and stop receiving emails from it, send an email to orient-databa...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages