Class: TSQLColumnDescriptor

Declaration: SQLDataAccess.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible, MReferenceCounted

Inherited By:

None.

Purpose:

This concrete class provides descriptive information for a single column of a database table. Use the associated counted pointer class, TSQLColumnDescriptorHandle, instead of using TSQLColumnDescriptor directly.

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: TSQLColumnDescriptor::~TSQLColumnDescriptor

virtual ~ TSQLColumnDescriptor ()

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: TSQLColumnDescriptor::TSQLColumnDescriptor

  1. TSQLColumnDescriptor (const TSQLColumnDescriptor &)
  2. TSQLColumnDescriptor ()
  3. TSQLColumnDescriptor (const TSQLTableDescriptorHandle &, const TText & columnName, Position columnPosition, ColumnType columnType, const TText & columnTypeName, bool columnNullable, Precision columnPrecision, Length columnLength, Scale columnScale)

Interface Category:

API.

Purpose:

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

Calling Context:

  1. Called to copy an object. Call this function directly.
  2. Called by the stream-in operators and any other function that needs to construct an uninitialized object.
  3. 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: TSQLColumnDescriptor::operator=

TSQLColumnDescriptor & operator =(const TSQLColumnDescriptor &)

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

virtual TStream & operator <<= (TStream &)

Interface Category:

API.

Purpose:

Stream-in operator. Streams in an SQL column description.

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

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

Interface Category:

API.

Purpose:

Stream-out operator. Streams out an SQL column description.

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: TSQLColumnDescriptor::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: TSQLColumnDescriptor::IsEqual

virtual bool IsEqual (const MCollectible *) const

Interface Category:

API.

Purpose:

Determines if this object equals its argument.

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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.