CarobNS::Request Class Reference

Defines a Request object, a private implementation of [Parameter]Statement class that holds and handles sql requests. More...

#include <Request.hpp>

Inheritance diagram for CarobNS::Request:

CarobNS::RequestWithResultSetParameters List of all members.

Public Member Functions

void sendToStream (const DriverSocket &out) const throw (SocketIOException, UnexpectedException)
 Serializes the request on the output stream by sending only the needed parameters to reconstruct it on the controller.
bool isEscapeProcessing () const
 Returns the escapeProcessing value.
RequestsetEscapeProcessing (bool escapeProcessingPrm)
 Sets the escapeProcessing value.
std::wstring getSqlQueryOrTemplate () const
 Returns the sqlQuery value.
RequestsetParameters (std::wstring preparedStatementParametersPrm)
 Sets the sqlTemplate.
void setSqlQueryOrTemplate (std::wstring sqlQueryOrTemplatePrm)
 Sets the sqlQueryOrTemplate value.
 operator std::wstring & ()
 Cast to wstring operator to ease printing (for debug/traces).
std::wstring getPreparedStatementParameters () const
 Returns the preparedStatementParameters value.
bool isReadOnly ()
 Returns the isReadOnly value.
void setIsReadOnly (bool isReadOnlyPrm)
 Sets the isReadOnly value.
int64_t getId () const
 Returns the id value.
void setId (int64_t idPrm)
 Sets the id value.
bool isAutoCommit () const
 Returns the isAutoCommit value.
void setIsAutoCommit (bool isAutoCommitPrm)
 Sets the isAutoCommit value.
int getTimeoutInSeconds () const
 Returns the timeoutInSeconds value.
RequestsetTimeoutInSeconds (int timeoutInSecondsPrm)
 Sets the timeoutInSeconds value.

Protected Member Functions

 Request (std::wstring sql)
 Creates a new Request object.

Friends

class Statement
class ParameterStatement

Detailed Description

Defines a Request object, a private implementation of [Parameter]Statement class that holds and handles sql requests.


It basically carries the SQL statement and the SQL template if this is a ParameterStatement.


Constructor & Destructor Documentation

CarobNS::Request::Request ( std::wstring  sql  )  [inline, protected]

Creates a new Request object.

Protected to ensure no one but friend classes can use us

Parameters:
sql the SQL statement


Member Function Documentation

int64_t CarobNS::Request::getId (  )  const [inline]

Returns the id value.

Returns:
the request identifier

std::wstring CarobNS::Request::getPreparedStatementParameters (  )  const [inline]

Returns the preparedStatementParameters value.

Returns:
Returns the preparedStatementParameters.

std::wstring CarobNS::Request::getSqlQueryOrTemplate (  )  const [inline]

Returns the sqlQuery value.

Returns:
Returns the sqlQuery.

int CarobNS::Request::getTimeoutInSeconds (  )  const [inline]

Returns the timeoutInSeconds value.

Returns:
Returns the timeoutInSeconds.

bool CarobNS::Request::isAutoCommit (  )  const [inline]

Returns the isAutoCommit value.

Returns:
the isAutoCommit

bool CarobNS::Request::isEscapeProcessing (  )  const [inline]

Returns the escapeProcessing value.

Returns:
the escapeProcessing.

bool CarobNS::Request::isReadOnly (  )  [inline]

Returns the isReadOnly value.

Returns:
true if the connection has been set to read only

CarobNS::Request::operator std::wstring & (  )  [inline]

Cast to wstring operator to ease printing (for debug/traces).

Returns:
sql query as a string

void CarobNS::Request::sendToStream ( const DriverSocket out  )  const throw (SocketIOException, UnexpectedException)

Serializes the request on the output stream by sending only the needed parameters to reconstruct it on the controller.

Parameters:
out destination socket to controller
Exceptions:
SocketIOException an error occurs on the stream

Reimplemented in CarobNS::RequestWithResultSetParameters.

Request& CarobNS::Request::setEscapeProcessing ( bool  escapeProcessingPrm  )  [inline]

Sets the escapeProcessing value.

Parameters:
escapeProcessingPrm escapeProcessing to set.

void CarobNS::Request::setId ( int64_t  idPrm  )  [inline]

Sets the id value.

Parameters:
idPrm to set

void CarobNS::Request::setIsAutoCommit ( bool  isAutoCommitPrm  )  [inline]

Sets the isAutoCommit value.

Parameters:
isAutoCommitPrm The isAutoCommit to set.

void CarobNS::Request::setIsReadOnly ( bool  isReadOnlyPrm  )  [inline]

Sets the isReadOnly value.

Parameters:
isReadOnlyPrm value to set.

Request& CarobNS::Request::setTimeoutInSeconds ( int  timeoutInSecondsPrm  )  [inline]

Sets the timeoutInSeconds value.

Parameters:
timeoutInSecondsPrm The timeoutInSeconds to set.


The documentation for this class was generated from the following file:
Generated on Fri Mar 9 17:40:20 2007 for Carob by  doxygen 1.4.7