Class: TSQLColumnDescriptorHandle

Declaration: SQLDataAccess.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible

Inherited By:

None.

Purpose:

This concrete class is a counted pointer memory management surrogate for TSQLColumnDescriptor. It gives clients access to member functions of TSQLColumnDescriptor. Although clients might need to create a TSQLColumnDescriptorHandle instance explicitly, most instances are created and returned by calling the FetchSQLColumnDescriptor member function of a TSQLColumnCatalog record source.

Instantiation:

Always allocate on the stack.

Deriving Classes:

None.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TSQLColumnDescriptorHandle::TSQLColumnDescriptorHandle

  1. TSQLColumnDescriptorHandle ()
  2. TSQLColumnDescriptorHandle (const TSQLTableDescriptorHandle &, const TText & columnName =TStandardText :: GetEmptyText (), Position columnPosition =0, ColumnType columnType =GetUnknownType (), const TText & columnTypeName =TStandardText :: GetEmptyText (), bool columnNullable =true, Precision columnPrecision =0, Length columnLength =0, Scale columnScale =0)
  3. TSQLColumnDescriptorHandle (const TSQLColumnDescriptorHandle &)
  4. TSQLColumnDescriptorHandle (TSQLColumnDescriptor & source)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. A constructor that takes client specifics.
  3. Copy constructor.
  4. Constructs a handle from a master object.

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.
  4. 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: TSQLColumnDescriptorHandle::~TSQLColumnDescriptorHandle

virtual ~ TSQLColumnDescriptorHandle ()

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: TSQLColumnDescriptorHandle::operator=

TSQLColumnDescriptorHandle & operator =(const TSQLColumnDescriptorHandle &)

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.

Member Function: TSQLColumnDescriptorHandle::GetName

const TText & GetName (TText &) const

Interface Category:

API.

Purpose:

Returns the database column name.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A const reference to the database column name.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLColumnDescriptorHandle::GetPosition

Position GetPosition () const

Interface Category:

API.

Purpose:

Returns the column position. The definition of column position is datastore specific, but typically refers to column creation order and is often used to order column descriptions during retrieval. The client should make no assumptions about the numeric values of this field other than that they can be used to specify a total ordering of columns.

Calling Context:

Call this function directly.

Parameters:

Return Value:

The column position.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLColumnDescriptorHandle::GetType

const ColumnType & GetType () const

Interface Category:

API.

Purpose:

Returns the data type of the column polymorphically.

Calling Context:

Call this function directly.

Parameters:

Return Value:

The data type of the column.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLColumnDescriptorHandle::GetTypeHint

ESQLColumnTypeHint GetTypeHint () const

Interface Category:

API.

Purpose:

Returns the enumerated data type of the column, which can be more convenient to use than GetType.

Calling Context:

Call this function directly.

Parameters:

Return Value:

The enumerated data type of the column.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLColumnDescriptorHandle::GetTypeName

const TText & GetTypeName (TText &) const

Interface Category:

API.

Purpose:

Returns the data type name of the column. The type name returned is data-source dependent and is meant for end-user display. Client applications should use GetType for actual type determination.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A const reference to the data type name of the column.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLColumnDescriptorHandle::GetNullable

bool GetNullable () const

Interface Category:

API.

Purpose:

Determines if the column allows Null values.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if the column allows Null values.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLColumnDescriptorHandle::GetPrecision

Precision GetPrecision () const

Interface Category:

API.

Purpose:

Returns the precision of the column. For numeric types, this is the maximum number of decimal digits the type can support.

Calling Context:

Call this function directly.

Parameters:

Return Value:

The precision of the column.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLColumnDescriptorHandle::GetLength

Length GetLength () const

Interface Category:

API.

Purpose:

Returns the data byte length of the column. For character data, this is the maximum number of displayed characters (excluding null-termination). In general, the length is different than the data source physical storage size.

Calling Context:

Call this function directly.

Parameters:

Return Value:

The data byte length of the column.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLColumnDescriptorHandle::GetScale

Scale GetScale () const

Interface Category:

API.

Purpose:

Returns the scale of the column. For numeric types, this is the number of decimal places to the right of the decimal point. Applies only to those numeric data types that support this concept.

Calling Context:

Call this function directly.

Parameters:

Return Value:

The scale of the column.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLColumnDescriptorHandle::GetRemarks

const TText & GetRemarks (TText &) const

Interface Category:

API.

Purpose:

Returns the remarks associated with the column.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A const reference to the remarks associated with the column.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLColumnDescriptorHandle::GetSQLTableDescriptor

const TSQLTableDescriptorHandle & GetSQLTableDescriptor () const

Interface Category:

API.

Purpose:

Returns a table description handle associated with the given column.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A table description handle associated with the given column.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLColumnDescriptorHandle::operator<<=

virtual TStream & operator <<= (TStream &)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself in from.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLColumnDescriptorHandle::operator>>=

virtual TStream & operator >>=(TStream &) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself out to.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLColumnDescriptorHandle::Hash

virtual long Hash () const

Interface Category:

API.

Purpose:

Returns the hash value for object.

Calling Context:

Call this function directly.

Parameters:

Return Value:

The hash value for object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLColumnDescriptorHandle::IsEqual

virtual bool IsEqual (const MCollectible *) const

Interface Category:

API.

Purpose:

Determines if this object equals its argument, that is, if all members except remarks are equal.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if all members except remarks are equal.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLColumnDescriptorHandle::IsSame

virtual bool IsSame (const MCollectible *) const

Interface Category:

API.

Purpose:

Determines if this object is the same as its argument, that is, if all their members are equal.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if all members are equal.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLColumnDescriptorHandle::GetTypeOfHint

static const ColumnType & GetTypeOfHint (ESQLColumnTypeHint, ColumnType &)

Interface Category:

API.

Purpose:

Returns the column type associated with the given column type hint.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A const reference to the column type.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLColumnDescriptorHandle::GetTypeHintOfType

static ESQLColumnTypeHint GetTypeHintOfType (const ColumnType &)

Interface Category:

API.

Purpose:

Returns the column type hint associated with the given column type.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A const reference to the column type hint.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSQLColumnDescriptorHandle::GetUnknownType

static const ColumnType & GetUnknownType ()

Interface Category:

API.

Purpose:

Returns the unknown column type.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A const reference to the unknown column type.

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.