[Cubicweb] Build the absolute url of an entity directly from database

Carlos Balderas carlos.balderas at gmail.com
Mon Jan 28 01:48:56 CET 2013


Hi List,

I am making a kind of a big heavy report report view, I am looking to
improve the performance of it. What I was actually doing was to retrieve
the main entity, and then read all its relations and display them in a html
table format using "incontext" view for every relation, I am trying to
avoid to go back to database and ask for every set of relations for the
main entity.

I made a rql sentence that retrieves almost all the needed information just
to read row by row and format the information and display it in a html
table, I undestand I am kind of wasting the already existing cubicweb
clases to do this job, but I consider that by doing most of the work in the
database is a good option in this case.

One thing I am missing is the absolute_url of every requested entity, would
it be possible to get in the same rql sentence just by doing some joins?

e.g.

Any X, Z WHERE X eid 1234, X some_cwmeta_relation Y, Y entity_url_key Z

so Z can give the key to build the absolute_url directly from database.

The goal for this view is to make just one call to database using the rql
sentence and relay all the effort on it.

Thank you for your time and any help or comment will be very welcome.

Best Regards!

-- 
Carlos Balderas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubicweb.org/pipermail/cubicweb/attachments/20130127/aa877dff/attachment-0185.html>


More information about the Cubicweb mailing list