Forum OpenACS Q&A: Does QD work under /www?

Collapse
Posted by Jun Yamog on
Hi,

I am wondering does Query Dispatcher work under /www?

I am trying out OACS on Postgres just right now.  Most of the time I
have been using Oracle.  Basically I have a simple query at
/www/index.tcl.  Since the query uses the function site_node.node_id()
I have to use site_node__node_id() for postgres.

I have created /www/index-postgresql.xql and /www/index-oracle.xql.
For some odd reason the query is still being sourced out from index.tcl

I would not want to put it into a package.  Its a simple page query.
Although if someone can confirm that QD does not work on /www just
like QD does not work on /tcl.

Jun

Collapse
Posted by Jun Yamog on
Dumb post.  I have looking at the docs, porting docs, etc.  The vanilla OpenACS 4 has this.  I will just study this stuff.  Sorry about that dumb post.  I have nuked out this files on my site, gladly I took a look at my CVS copy of the OpenACS 4.0

Jun

Collapse
Posted by Jun Yamog on
I feel really weird writing this.  Answering my own question.  I hope this will help some poor soul our there.

In order of QD to get your query properly:

1. include your dir at "set dirs {www tcl www/subdir/yourdir}" its at the bottom of /tcl/zz-postload.tcl
2. make the xql file either manual or via Query Extractor.  Did mine manually since it was simple SQLs.
3. on the xql file name your query as "name=dbqd.www.subdir.yourdir.youfile"
4. restart aolserver.

I dont advice you do use this method.  Although I think for simple queries this will do.  The down sides here, you have to restart aolserver since RP does not watch the files under www.

Jun