Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
None.
Inherited By:
TSQLStandardStatement
Purpose:
This abstract class is a utility class for clients and providers that analyzes the structure of a Base Client SQL statement. Statement objects do not require a connection.
Statement objects can be created directly or can be obtained from any command object.
Instantiation:
Abstract class; do not allocate.
Deriving Classes:
See TSQLStandardStatement for a concrete implementation.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
Other Considerations:
None.
- TSQLStatement ()
- TSQLStatement (const TText &)
- TSQLStatement (const TSQLStatement & source)
Interface Category:
API.
Purpose:
- Default constructor. Constructs an invalid object.
- Constructs a statement initialized with the text argument.
- Copy constructor.
Calling Context:
- Called by the stream-in operators and any other function that needs to construct an uninitialized object.
- Call this function directly.
- Called to copy an object.
Parameters:
- Takes no parameters.
- const TText & -The text of the SQL statement.
- const TSQLStatement & source -The object to copy.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TSQLStatement ()
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: TSQLStatement::operator=
virtual TSQLStatement & operator =(const TSQLStatement & right)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
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.
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:
- TText & -On return, holds the SQL statement.
- const TSQLHint & hint =TSQLHint :: GetEmptyHint () -An SQL construction hint object to control statement translation.
Return Value:
A const reference to the SQL statement.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSQLStatement::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:
- TText & -On return, holds the SQL statement.
Return Value:
The client reference value is returned for use in a functional expression.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
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:
- const TText & -The new SQL statement.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSQLStatement::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:
- StatementType & -On return, holds the statement type.
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: TSQLStatement::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: TSQLStatement::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:
- ColumnPosition -Specifies the requested column; the valid range is from 1 to the return value of GetColumnCount.
- TText & -On return, holds the column name.
Return Value:
The column name.
Exceptions:
Raises an exception if the statement is not a SELECT statement, or the column position is out of range.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSQLStatement::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:
- ColumnPosition -Specifies the requested column; the valid range is from 1 to the return value of GetColumnCount.
- TText & -On return, holds the column alias.
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: TSQLStatement::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: TSQLStatement::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:
- TSQLParameter :: Position -Specifies the parameter to be set.
- const TText & -The new text of the parameter.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSQLStatement::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:
- TSQLParameter :: Position -Specifies the parameter to be retrieved.
- TText & -On return, holds the requested parameter.
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: TSQLStatement::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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.