Class Alias
This class implements the Alias class. As used when redefining the name of an Aggregation.
Implements
Inherited Members
Namespace: SuperOffice.Data.SQL
Assembly: SoDataBase.dll
Syntax
public sealed class Alias : ICloneable
Remarks
The class can be used in two ways. In an aggregation with only the string-member used, or as an ordinary alias on a field in the returnfieldscollection, with both field-member and string-member used.
If alias is going to be used on e.g. an mathematical operation SELECT ( firstname + ' ' + lastname ) AS PersonName the alias must be set on the mathematical operation, not the fieldinfo(s) the operation is working on.
To avoid potential problems with special characters on the different databases, we accept only alias with characters in range A-Z and 0-9. Oracle does not allow underscore (_) in front of an alias, so we also validate that.Since we use T0...Tx as auto-generated table-aliases, we validate the alias against this pattern.
Constructors
Alias(string)
Initializes a new instance of the Alias class.
Declaration
public Alias(string alias)
Parameters
Type | Name | Description |
---|---|---|
string | alias | The alias. |
Remarks
The class can be used in two ways. In an aggregation with only the string-member used, or as an ordinary alias on a field in the returnfieldscollection, with both field-member and string-member used.
If alias is going to be used on e.g. an mathematical operation SELECT ( firstname + ' ' + lastname ) AS PersonName the alias must be set on the mathematical operation, not the fieldinfo(s) the operation is working on.
To avoid potential problems with special characters on the different databases, we accept only alias with characters in range A-Z and 0-9. Oracle does not allow underscore (_) in front of an alias, so we also validate that.Since we use T0...Tx as auto-generated table-aliases, we validate the alias against this pattern.
Properties
Name
Get/Set the alias value.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
Remarks
The class can be used in two ways. In an aggregation with only the string-member used, or as an ordinary alias on a field in the returnfieldscollection, with both field-member and string-member used.
If alias is going to be used on e.g. an mathematical operation SELECT ( firstname + ' ' + lastname ) AS PersonName the alias must be set on the mathematical operation, not the fieldinfo(s) the operation is working on.
To avoid potential problems with special characters on the different databases, we accept only alias with characters in range A-Z and 0-9. Oracle does not allow underscore (_) in front of an alias, so we also validate that.Since we use T0...Tx as auto-generated table-aliases, we validate the alias against this pattern.
Methods
Clone()
This class implements the Alias class. As used when redefining the name of an Aggregation.
Declaration
public object Clone()
Returns
Type | Description |
---|---|
object |
Remarks
The class can be used in two ways. In an aggregation with only the string-member used, or as an ordinary alias on a field in the returnfieldscollection, with both field-member and string-member used.
If alias is going to be used on e.g. an mathematical operation SELECT ( firstname + ' ' + lastname ) AS PersonName the alias must be set on the mathematical operation, not the fieldinfo(s) the operation is working on.
To avoid potential problems with special characters on the different databases, we accept only alias with characters in range A-Z and 0-9. Oracle does not allow underscore (_) in front of an alias, so we also validate that.Since we use T0...Tx as auto-generated table-aliases, we validate the alias against this pattern.