Forum OpenACS Development: Package for SQL queries

Collapse
Posted by Malte Sussdorff on
I was wondering if we have a package for storing and executing SQL queries and if yes, can it offer it's services via a service contract.

Situation:
Tom is writing a new version of the Cronjob package, that allows you to store SQL queries to execute on reports. Timo is writing a mailinglist manager that allows you to query users and additional information and store these queries. We are thinking about adding a reporting part to the Survey Module, that allows you to query specific information about a survey responses without having to look at all the information at once (e.g. show me all users that answer with yes on question y in section x).

Idea:
Have one central place to store these SQL queries. Besides the usual suspects, it would store what kind of SQL query this is (at least what package it comes from) and a description. This way we can exchange queries between packages and don't have to deal with security and approval functionality within each seperate package (again). Meaning, if an admin approved a query for the survey package, the cronjob package should not have to reapprove the same query again if it wants to use it.

Does this make sense to you and would this be of general use?

Collapse
Posted by Tom Jackson on

The Cron Package will be more generic than just handling SQL queries. I was actually thinking that several types of SQL queries, as well as scripts: tcl, tclsh, sh, bash, csh, etc. could be added. You should be able to add types without reprogramming the Cron Package.

Also, queries are qualified as approved in a particular situation: by a user or group. Or at least that was what I was thinking about. I'm not in a rush to start coding, so any suggestions on what I should do are greatly appreciated.