org.apache.cocoon.processor.sql
Class SQLQueryCreator

java.lang.Object
  |
  +--org.apache.cocoon.processor.sql.SQLQueryCreator

public class SQLQueryCreator
extends java.lang.Object

A class that can create a SQL query. It's given a query to start with, plus a query_props table that contains parameters from the XML file, and the parameters table from cocoon that notably may contain a HttpServletRequest object keyed from "request".

Version:
$Revision: 1.6 $ $Date: 1999/10/26 16:20:38 $
Author:
Donald Ball

Constructor Summary
SQLQueryCreator()
           
 
Method Summary
 java.lang.String getQuery(java.sql.Connection conn, java.lang.String query, org.w3c.dom.Element query_element, java.util.Properties query_props, java.util.Dictionary parameters)
           
static java.lang.String SQLEscape(java.sql.Connection conn, java.lang.String value)
          In theory, this should be a convenience method for subclasses to escape strings containing ', but this doesn't work for _my_ database drivers.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

SQLQueryCreator

public SQLQueryCreator()
Method Detail

getQuery

public java.lang.String getQuery(java.sql.Connection conn,
                                 java.lang.String query,
                                 org.w3c.dom.Element query_element,
                                 java.util.Properties query_props,
                                 java.util.Dictionary parameters)
                          throws java.lang.Exception

SQLEscape

public static java.lang.String SQLEscape(java.sql.Connection conn,
                                         java.lang.String value)
                                  throws java.sql.SQLException
In theory, this should be a convenience method for subclasses to escape strings containing ', but this doesn't work for _my_ database drivers. I may just add a static table of escape strings for broken JDBC drivers, if this is actually the fault of the JDBC driver and not the spec.


Copyright 1999 Java Apache Project. All Rights Reserved.