iopc::SimpleTypeParameter Class Reference
[iopcdb]

A Parameter implementation for basic C++ numeric and string types. More...

#include <cursor.h>

Inheritance diagram for iopc::SimpleTypeParameter:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 SimpleTypeParameter (ParamType type, const int pos, const void *varAddr, const Type &varType, const MetadataHolder &attributes=MetadataHolder::emptyMeta)


Detailed Description

A Parameter implementation for basic C++ numeric and string types.

Requires the varType to be of Type::IOPC_TYPECLASS_STRING or Type::IOPC_TYPECLASS_SIMPLE


Constructor & Destructor Documentation

iopc::SimpleTypeParameter::SimpleTypeParameter ( ParamType  type,
const int  pos,
const void *  varAddr,
const Type varType,
const MetadataHolder attributes = MetadataHolder::emptyMeta 
)

Parameters:
type Parameter direction
pos Position of the parameter in the prepared statement or in the result set, starting from 1. Note that some drivers (like the IopcOracle10g driver) require the OUT parameters to be bound as a sequence so that no positions are skipped.
varAddr Address of the input parameter value or an output buffer to be bound If Type::IOPC_TYPECLASS_STRING type is used, this pointer must point to a buffer containing standard, zero-terminated C string representation [IN] or to a buffer into which a standard C string will be fetched [OUT]. So even if the varType is TypeDesc<std::string> the varAddr must point [IN] or will point [OUT] to a standard C string.
varType Parameter data type
attributes Additional attributes or driver-dependent data.
  • [db.type.length] - For the Type::IOPC_TYPECLASS_STRING types it specifies the maximum allocated length (in characters without the trailing zero) for the input and output buffers.
If Type::IOPC_TYPECLASS_STRING type is used, the [db.type.length] metadata must be specified either in the varType metadata or provided in the attributes input parameter.


The documentation for this class was generated from the following files:

Generated on Tue Apr 14 16:46:39 2009 for IOPC 2 by  doxygen 1.5.6