Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

DDLStreamer Class Reference

#include <ddlstreamer.hpp>

Inheritance diagram for DDLStreamer:

Inheritance graph
[legend]
Collaboration diagram for DDLStreamer:

Collaboration graph
[legend]
List of all members.

Detailed Description

Named buffer reader XML handler class.

Definition at line 57 of file ddlstreamer.hpp.

Public Methods

 DDLStreamer (const XMLStreamerFactory *p_pParent, StreamerParams *p_pParameters, XMLFlowContext *p_pContext, XMLStreamConsumer *p_pOutput, ContentHandler *p_pHandler, bool p_fCopyStreamToOutput)
virtual ~DDLStreamer ()
bool commitStream (bool p_fFinal=false)
 xML Stream commit function.
This function is called to commit a chunk or the whole of the input XML stream.
A partial commit means that the data provided since last commit is OK for processing.
A final commit means that the whole input stream has been provided and that the streamer should consider the input XML document as complete.


void makeNodeDDL (DBOBJDefinitionNode *p_pDefinitionNode, XMLStreamConsumer *p_pOutput) const
 Produces the CREATE TABLE statement for a definition node.

char * getColumnDDL_Simple (const char *p_pszReducedType) const
 Returns column type according to reduced type information. All alphanumeric fields are mapped as VARCHAR[DDLSTREAMER_VARCHARSIZE] and all fields are mapped as DOUBLE. This degraded mode is used when DBspec field is not present in definition.


Constructor & Destructor Documentation

BEGIN_XDFLENGINE_NS DDLStreamer::DDLStreamer const XMLStreamerFactory   p_pParent,
StreamerParams   p_pParameters,
XMLFlowContext   p_pContext,
XMLStreamConsumer   p_pOutput,
ContentHandler *    p_pHandler,
bool    p_fCopyStreamToOutput
 

Definition at line 54 of file ddlstreamer.cpp.

References DEBUG_CREATE.

DDLStreamer::~DDLStreamer   [virtual]
 

Definition at line 63 of file ddlstreamer.cpp.

References DEBUG_DEL.


Member Function Documentation

bool DDLStreamer::commitStream bool    p_fFinal = false [virtual]
 

xML Stream commit function.
This function is called to commit a chunk or the whole of the input XML stream.
A partial commit means that the data provided since last commit is OK for processing.
A final commit means that the whole input stream has been provided and that the streamer should consider the input XML document as complete.

Reimplemented from SaxStreamer.

Definition at line 71 of file ddlstreamer.cpp.

References CATCH_XML_FLOW_ERROR_RELEASE_AND_RETURN, SaxStreamer::commitStream(), DEBUG_IN, DEBUG_OUT, SaxStreamer::m_pHandler, makeNodeDDL(), ON_XML_FLOW_ERROR_DO, ON_XML_FLOW_ERROR_THROW, PREP_CATCH_XML_FLOW_ERROR, and WATCH_XML_FLOW_ERROR.

char * DDLStreamer::getColumnDDL_Simple const char *    p_pszReducedType const
 

Returns column type according to reduced type information. All alphanumeric fields are mapped as VARCHAR[DDLSTREAMER_VARCHARSIZE] and all fields are mapped as DOUBLE. This degraded mode is used when DBspec field is not present in definition.

Parameters:
p_strReducedType (string) field reduced type.

Definition at line 209 of file ddlstreamer.cpp.

References concatCharBuffer(), copyCharBuffer(), DEBUG_FUNC, DBStreamerFactory::getSQLSyntax(), SQL_SYNTAX_DB2, SQL_SYNTAX_MSSQL, and SQL_SYNTAX_ORA.

Referenced by makeNodeDDL().

void DDLStreamer::makeNodeDDL DBOBJDefinitionNode   p_pDefinitionNode,
XMLStreamConsumer   p_pOutput
const
 

Produces the CREATE TABLE statement for a definition node.

Parameters:
p_pDefinitionNode (DBOBJDefinitionNode*) The definition node to translate.
p_pOutBuffer (XMLStreamBuffer*) The buffer to put statements into.

Definition at line 119 of file ddlstreamer.cpp.

References CATCH_XML_FLOW_ERROR_RELEASE_AND_RETURN, copyCharBuffer(), DEBUG_IN, DEBUG_OUT, DBOBJDefinitionNode::getChildNode(), DBOBJDefinitionNode::getChildNodesCount(), getColumnDDL_Simple(), DBOBJDefinitionField::getDBField(), DBOBJDefinitionField::getDBSpecProps(), DBOBJDefinitionNode::getDBTable(), DBOBJDefinitionNode::getField(), DBOBJDefinitionNode::getFieldsCount(), DBOBJDefinitionField::getMap(), DBOBJDefinitionNode::getName(), ON_XML_FLOW_ERROR_THROW, OTL_getColumnDDL(), PREP_CATCH_XML_FLOW_ERROR, releaseCharBuffer(), THROW_XMLFLOW_EXCEPTION, and WATCH_XML_FLOW_ERROR.

Referenced by commitStream().


The documentation for this class was generated from the following files:
Generated on Sat Oct 4 13:23:56 2003 for XDFLengine by doxygen1.3-rc2