Genezzo::Contrib::Clustered::ModPerlWrap - Mod Perl wrappers for Genezzo
StartPage(); Connect("/dev/raw"); ProcessStmt("insert into t1 values (10, 'test10')"); ProcessStmt("insert into t1 values (11, 'test11')"); Commit(); FinishPage();
StartPage(); Connect("/dev/raw"); ProcessStmt("select * from t1"); FinishPage();
The Apache web server is used to provide multi-user XML over HTTP access to the Clustered Genezzo database. A page containing multiple SQL statements acts much like a stored procedure. The web page parameters are used like stored procedure parameters, and the processing on the page forms the transaction boundary.
Note control flow on page does not continue after errors or FinishPage().
See genezzo_form.pl for examples.
May use "PerlModule ModPerlWrap" in apache2.conf. This preloads this module and the rest of the Genezzo modules so they are (initially) shared between all apache processes, saving memory.
- Connect GNZ_HOME
Connects to Clustered Genezzo database with home GNZ_HOME. Only performed once per process.
Prints form which can be used to sent SQL statements to web server.
Prints initial HTML and XML at beginning of response.
- ProcessStmt STMT
Processes SQL statement. Result rows are wrapped in XML and printed. On execute errors automatically does rollback and ends page processing.
Rolls back transaction. Often unnecessary as ProcessStmt execute errors are automatically rolled back.
- Finish Page
Prints final closing XML tags and ends page processing. Note control flow does not continue beyond this point.
Requires Apache 2 and Perl 5.8.4+. On Apache 1.3 SIGUSR2 delivery is often delayed. Note the standard web server on Mac OS X is Apache 1.3.
This is pre-alpha software; don't use it to store any data you hope to see again!
Eric Rollins, firstname.lastname@example.org
Copyright (C) 2005 by Eric Rollins. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Address bug reports and comments to email@example.com