AEColumn Class Reference

A class that models a direct reference to a named relational expression which can be a table, view or sub-query in the FROM clause of a <query specification> as defined in the SQL-92 spec. More...

Inherits AETerminalExprT< AEValueExpr >.

List of all members.

Public Member Functions

virtual void AcceptVisitor (AENodeVisitor &in_visitor)
 Calls the correct method on the visitor.
 AEColumn (const AEColumn &in_other)
 Copy constructor.
 AEColumn (AENamedRelationalExpr *in_namedRelExpr, simba_uint16 in_columnNum)
 Constructor.
 AEColumn (AEColumnInfo &in_colInfo)
 Constructor.
virtual AEColumnClone () const
 Creates a clone of this node object.
virtual const AEColumnGetAsColumn () const
 Gets the object as an AEColumn object.
virtual AEColumnGetAsColumn ()
 Gets the object as an AEColumn object.
virtual void GetCatalogName (simba_wstring &out_catalogName) const
 Returns the Catalog name.
virtual
Simba::DSI::DSICollatingCoercibility 
GetCollatingCoercibility () const
 Gets the collating coercibility of the column.
virtual SharedPtr
< Simba::DSI::ICollation
GetCollation () const
 Gets the collation of the column.
virtual const
Simba::DSI::DSIColumnMetadata
GetColumnMetadata () const
 Gets a reference to the DSIColumnMetadata describing the column.
simba_uint16 GetColumnNum () const
 Returns the column number for this value expression in relation to the relational expression that this value expression references.
virtual simba_uint32 GetColumnSize () const
 Returns the size for the column for character or binary data.
virtual void GetLabel (simba_wstring &out_label) const
 Retrieves the label of the column.
virtual simba_wstring GetLogString () const
 Returns a string name for this node for the purpose of logging.
ETRelationalExprGetMaterializedRelationalExpr ()
 Gets a pointer reference to the relational expression to which this column references.
virtual SqlTypeMetadataGetMetadata () const
 Returns a SqlTypeMetadata* describing the column. (NOT OWN).
virtual void GetName (simba_wstring &out_name) const
 Retrieves the name of the column.
AENamedRelationalExprGetNamedRelationalExpr () const
 Gets a pointer reference to the relational expression to which this column references.
virtual AENodeType GetNodeType () const
 Returns an integer that uniquely identifies the node class. See the definition of AENodeType for values defined.
AEQueryScope * GetQueryScopeResolved ()
 Gets the query scope that this column is resolved.
virtual void GetSchemaName (simba_wstring &out_schemaName) const
 Returns the Schema name.
virtual
Simba::DSI::DSIColumnSearchable 
GetSearchable () const
virtual void GetTableName (simba_wstring &out_tableName) const
 Returns the name of the table.
virtual
Simba::DSI::DSIColumnUpdatable 
GetUpdatable () const
 Describes whether the column is updatable in the result set.
virtual bool IsAutoUnique () const
 Indicates whether the column is auto-incrementing or not.
virtual bool IsCaseSensitive () const
 Indicates whether the column is case sensitive.
virtual Simba::DSI::DSINullable IsNullable () const
 Indicates whether the column may hold null data.
bool IsOuterRef () const
 Tells whether this column is an outer reference. That is, a column reference in a correlated sub-query.
virtual bool IsSortable () const
 Indicates whether the column is sortable.
virtual bool IsUnnamed () const
 Indicates whether the column contains a column alias or name.
void SetColumnNum (simba_uint16 in_colNumber)
 Returns the column number for this value expression in relation to the relational expression that this value expression references.
void SetMaterializedRelationalExpr (ETRelationalExpr *in_relExpr)
 Sets the relational expression that this column references.
void SetNamedRelationalExpr (AENamedRelationalExpr *in_namedRelation)
 Sets the named relation that this column references.
virtual ~AEColumn ()
 Destructor.

Protected Member Functions

virtual bool IsEqual (const AENode *in_another) const
 Tell whether two nodes are "equal".

Friends

class AERelationalExpr

Detailed Description

A class that models a direct reference to a named relational expression which can be a table, view or sub-query in the FROM clause of a <query specification> as defined in the SQL-92 spec.

Will always have no children (GetChildCount() returns 0).


Constructor & Destructor Documentation

AEColumn ( AEColumnInfo in_colInfo  ) 

Constructor.

Parameters:
in_colInfo Information about the column.
Exceptions:
SEInvalidArgumentException when in_colInfo is not valid.
AEColumn ( AENamedRelationalExpr in_namedRelExpr,
simba_uint16  in_columnNum 
)

Constructor.

IMPORTANT: The constructor allows the query scope to which the column is resolved to be NULL. It is used to construct the column after the initial construction of the AETree (i.e. during optimization).

Parameters:
in_namedRelExpr The named relational expression. Cannot be NULL. (NOT OWN)
in_columnNum The column number.
AEColumn ( const AEColumn in_other  ) 

Copy constructor.

To support "cloning". See Clone() method.

Parameters:
in_other The other node to create a copy from.
virtual ~AEColumn (  )  [virtual]

Destructor.


Member Function Documentation

virtual void AcceptVisitor ( AENodeVisitor in_visitor  )  [virtual]

Calls the correct method on the visitor.

Parameters:
in_visitor The visiting object.

Implements AENode.

virtual AEColumn* Clone (  )  const [virtual]

Creates a clone of this node object.

Returns:
A clone of this node object. (OWN)

Implements AEValueExpr.

virtual const AEColumn* GetAsColumn (  )  const [virtual]

Gets the object as an AEColumn object.

Overrides the method defined in AEValueExpr.

Returns:
this object as an AEColumn object. (NOT OWN)

Reimplemented from AEValueExpr.

virtual AEColumn* GetAsColumn (  )  [virtual]

Gets the object as an AEColumn object.

Overrides the method defined in AEValueExpr.

Returns:
this object as an AEColumn object. (NOT OWN)

Reimplemented from AEValueExpr.

virtual void GetCatalogName ( simba_wstring out_catalogName  )  const [virtual]

Returns the Catalog name.

This default implementation returns empty string.

Parameters:
out_catalogName The output catalog name.

Reimplemented from AEValueExpr.

virtual Simba::DSI::DSICollatingCoercibility GetCollatingCoercibility (  )  const [virtual]

Gets the collating coercibility of the column.

Returns:
An enum that specifies the coercibility of the column.

Reimplemented from AEValueExpr.

virtual SharedPtr<Simba::DSI::ICollation> GetCollation (  )  const [virtual]

Gets the collation of the column.

Returns:
The collation of the column.

Reimplemented from AEValueExpr.

virtual const Simba::DSI::DSIColumnMetadata& GetColumnMetadata (  )  const [virtual]

Gets a reference to the DSIColumnMetadata describing the column.

Returns:
Reference to the DSIColumnMetadata describing the column.

Reimplemented from AEValueExpr.

simba_uint16 GetColumnNum (  )  const

Returns the column number for this value expression in relation to the relational expression that this value expression references.

Returns:
the column number.
virtual simba_uint32 GetColumnSize (  )  const [virtual]

Returns the size for the column for character or binary data.

For character data, this size should be in terms of the number of characters, not the number of bytes. For example, VARCHAR(10) and NVARCHAR(10) would both correspond to size of 10, even if NVARCHAR used 2 bytes per character.

This method is not used for non-character/binary data types.

Returns:
The size of the column for character or binary data.

Reimplemented from AEValueExpr.

virtual void GetLabel ( simba_wstring out_label  )  const [virtual]

Retrieves the label of the column.

Parameters:
out_label The output label for the value expression.

Reimplemented from AEValueExpr.

virtual simba_wstring GetLogString (  )  const [virtual]

Returns a string name for this node for the purpose of logging.

Returns:
A string representation of this node.

Implements AENode.

ETRelationalExpr* GetMaterializedRelationalExpr (  ) 

Gets a pointer reference to the relational expression to which this column references.

NOTE: This method is designed solely to assist materialization.

Returns:
a pointer reference to the relational expression to which this column references. (NOT OWN)
virtual SqlTypeMetadata* GetMetadata (  )  const [virtual]

Returns a SqlTypeMetadata* describing the column. (NOT OWN).

Reimplemented from AEValueExpr.

virtual void GetName ( simba_wstring out_name  )  const [virtual]

Retrieves the name of the column.

Parameters:
out_name The output name for the value expression.

Reimplemented from AEValueExpr.

AENamedRelationalExpr* GetNamedRelationalExpr (  )  const

Gets a pointer reference to the relational expression to which this column references.

Returns:
a pointer reference to the relational expression to which this column references. (NOT OWN)
virtual AENodeType GetNodeType (  )  const [virtual]

Returns an integer that uniquely identifies the node class. See the definition of AENodeType for values defined.

Returns:
The ID that uniquely identifies this type of nodes.

Implements AENode.

AEQueryScope* GetQueryScopeResolved (  ) 

Gets the query scope that this column is resolved.

Returns:
the query scope that this column is resolved.
virtual void GetSchemaName ( simba_wstring out_schemaName  )  const [virtual]

Returns the Schema name.

This default implementation returns empty string.

Parameters:
out_schemaName The output schema name.

Reimplemented from AEValueExpr.

virtual Simba::DSI::DSIColumnSearchable GetSearchable (  )  const [virtual]

Indicates how the column can be used in a WHERE clause.

Returns:
The DSIColumnSearchable value describing how the column can be used in a WHERE clause.

Reimplemented from AEValueExpr.

virtual void GetTableName ( simba_wstring out_tableName  )  const [virtual]

Returns the name of the table.

This default implementation returns empty string.

Parameters:
out_tableName The output table name.

Reimplemented from AEValueExpr.

virtual Simba::DSI::DSIColumnUpdatable GetUpdatable (  )  const [virtual]

Describes whether the column is updatable in the result set.

This default implementation returns DSI_READ_ONLY.

Reimplemented from AEValueExpr.

virtual bool IsAutoUnique (  )  const [virtual]

Indicates whether the column is auto-incrementing or not.

Returns:
True if the column is auto-incrementing; false otherwise.

Reimplemented from AEValueExpr.

virtual bool IsCaseSensitive (  )  const [virtual]

Indicates whether the column is case sensitive.

Returns:
True if the column is case sensitive; false otherwise.

Reimplemented from AEValueExpr.

virtual bool IsEqual ( const AENode in_another  )  const [protected, virtual]

Tell whether two nodes are "equal".

Two AEColumn's are equal if IsEqualComprehensive() returns true.

Parameters:
in_another Another node to compare to. (NOT OWN)
Returns:
true if two nodes are equal, false otherwise.

Reimplemented from AENode.

virtual Simba::DSI::DSINullable IsNullable (  )  const [virtual]

Indicates whether the column may hold null data.

Returns:
The DSIColumnNullable value, which indicates whether the column may hold null data.

Reimplemented from AEValueExpr.

bool IsOuterRef (  )  const

Tells whether this column is an outer reference. That is, a column reference in a correlated sub-query.

Returns:
true if this is an outer reference, false otherwise.
virtual bool IsSortable (  )  const [virtual]

Indicates whether the column is sortable.

Returns:
True if the column is sortable.

Reimplemented from AEValueExpr.

virtual bool IsUnnamed (  )  const [virtual]

Indicates whether the column contains a column alias or name.

This default implementation return false since most of the value expressions have neither a label nor a name.

Reimplemented from AEValueExpr.

void SetColumnNum ( simba_uint16  in_colNumber  ) 

Returns the column number for this value expression in relation to the relational expression that this value expression references.

Returns:
the column number.
void SetMaterializedRelationalExpr ( ETRelationalExpr in_relExpr  ) 

Sets the relational expression that this column references.

NOTE: This method is designed solely to assist materialization.

Parameters:
in_relExpr The materialized relational expression that this column should reference. (NOT OWN)
void SetNamedRelationalExpr ( AENamedRelationalExpr in_namedRelation  ) 

Sets the named relation that this column references.

Parameters:
in_namedRelation The named relation to reference. Cannot be NULL. (NOT OWN)

Friends And Related Function Documentation

friend class AERelationalExpr [friend]

The documentation for this class was generated from the following file:

Generated on Wed May 17 14:21:16 2017 for SimbaEngine 10.1.3.1011 by simba