Class: TSQLStandardStatement

Declaration: SQLStandardDataAccess.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TSQLStatement

Inherited By:

None.

Purpose:

A concrete implementation for the TSQLStatement class. TSQLStatement is a utility class for clients and providers that analyzes the structure of a Base Client SQL statement.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

None.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TSQLStandardStatement::TSQLStandardStatement

  1. TSQLStandardStatement ()
  2. TSQLStandardStatement (const TText &)
  3. TSQLStandardStatement (const TSQLStandardStatement & source)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. A constructor that takes client specifics.
  3. Copy constructor.

Calling Context:

  1. Called by the stream-in operators and any other function that needs to construct an uninitialized object.
  2. Call this function directly.
  3. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLStandardStatement::~TSQLStandardStatement

virtual ~ TSQLStandardStatement ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLStandardStatement::operator=

  1. virtual TSQLStatement & operator =(const TSQLStatement & right)
  2. virtual TSQLStandardStatement & operator =(const TSQLStandardStatement & right)

Interface Category:

API.

Purpose:

  1. Gives clients access to base class assignment operator.
  2. Assignment operator.

Calling Context:

  1. Called when an object is assigned to another compatible object.
  2. Called when an object is assigned to another compatible object.

Parameters:

Return Value:

A non-const reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLStandardStatement::GetSQLWithPlaceholders

virtual const TText & GetSQLWithPlaceholders (TText &) const

Interface Category:

API.

Purpose:

Returns the SQL statement, with placeholders currently associated with the command.

Calling Context:

Call this function directly.

Parameters:

Return Value:

The client reference value is returned for use in functional expression.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLStandardStatement::SetSQL

virtual void SetSQL (const TText &)

Interface Category:

API.

Purpose:

Sets the SQL statement to that passed in, replacing any existing SQL statement.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLStandardStatement::GetStatementType

virtual const StatementType & GetStatementType (StatementType &) const

Interface Category:

API.

Purpose:

Returns the type of the given statement.

Calling Context:

Call this function directly.

Parameters:

Return Value:

The type of the given statement.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLStandardStatement::GetStatementTypeHint

virtual EStatementTypeHint GetStatementTypeHint () const

Interface Category:

API.

Purpose:

Returns the enumerated type of the given statement.

Calling Context:

Call this function directly.

Parameters:

Return Value:

The enumerated type of the statement.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLStandardStatement::GetColumnName

virtual const TText & GetColumnName (ColumnPosition, TText &) const

Interface Category:

API.

Purpose:

Returns the specified result column name (or expression) for the SELECT statement.

Calling Context:

Call this function directly.

Parameters:

Return Value:

The column name.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLStandardStatement::GetColumnAlias

virtual const TText & GetColumnAlias (ColumnPosition, TText &) const

Interface Category:

API.

Purpose:

Returns the specified result column alias for the SELECT statement.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns TStandardText::GetEmptyText if the statement is not a SELECT statement or the column position is out of range.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLStandardStatement::GetColumnCount

virtual ColumnCount GetColumnCount () const

Interface Category:

API.

Purpose:

Returns the number of columns in the given SELECT statement.

Calling Context:

Call this function directly.

Parameters:

Return Value:

The number of columns in the given SELECT statement.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLStandardStatement::SetParameter

virtual void SetParameter (TSQLParameter :: Position, const TText &)

Interface Category:

API.

Purpose:

Sets the value of the specified parameter in a statement.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLStandardStatement::GetParameter

virtual const TText & GetParameter (TSQLParameter :: Position, TText &) const

Interface Category:

API.

Purpose:

Returns the current value of the specified parameter in a statement.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A constant reference to the requested parameter.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLStandardStatement::GetParameterCount

virtual ParameterCount GetParameterCount () const

Interface Category:

API.

Purpose:

Returns the number of parameters in the SQL statement.

Calling Context:

Call this function directly.

Parameters:

Return Value:

The number of parameters in the SQL statement.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLStandardStatement::GetSQL

virtual const TText & GetSQL (TText &, const TSQLHint & hint =TSQLHint :: GetEmptyHint ()) const

Interface Category:

API.

Purpose:

Returns the SQL statement, with bound parameter values, that is currently associated with the command. The client reference value is returned for use in a functional expression.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A const reference to the SQL statement.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.