Forum OpenACS Development: Re: query-writer -- eliminating pl functions

Collapse
Posted by Tom Jackson on

Randy,

I'll package up what I have. I did several upgrades:

  • Wizard install. You just give the table name of the acs_object and it grabs all the information from the database for the object attributes.
  • Almost no pl -- I have eliminated most pl, even though this was auto-generated anyway, and actually it still is, if you want to define the function signatures. What I did was to create a tcl procedure to create/update/delete the acs_objects table. Then an auto-generated tcl procedure calls this proc create the acs_object, then uses regular dml to insert data into the object table. Updates are regular dml to the object table, or through the acs_object::update function, same for deletes. I do create one function the object__object_p function, since it doesn't need a signature. The big benefit of a tcl api, is that when I upgrade the data model, I only need to add the new attributes (to the qw data model). I don't need to regenerate the pl functions, drop and reload.

But I think you might find it difficult to learn, no documentation. If you have a lot of data model to deal with, it should be alright, but for a few object tables, maybe more trouble than it is worth in its current state.

As an example, it probably takes me less than a half hour from the point the object table is ready, until all the api is finished.

I'll post the link here.

Collapse
Posted by Randy O'Meara on
Thank you, Tom. Please don't do any extra work on my behalf.

Randy

Collapse
Posted by Tom Jackson on

Randy: The query-writer package is here. Try version 0.6.0.

Collapse
Posted by Randy O'Meara on
Tom, thanks for taking the time to package this up. All of the links to the various versions of query-writer except 0.6.0 work. The link to 0.6.0 results in...
Not Found
The requested URL was not found on this server.

AOLserver/3.5.1 on http://tumbleweed.rmadilo.com
Collapse
Posted by Tom Jackson on

Oops, sorry, wrong permissions. Try now.

Collapse
Posted by Randy O'Meara on
Cool. Thanks.