UseEscapedNameAttribute Class

Defines an attribute that will request use of the escaped name of a modeled identifier, i.e., a table or field name. Typically needed when identifier names are reserved SQL key words.

Definition

Namespace: Gemstone.Data.Model
Assembly: Gemstone.Data (in Gemstone.Data.dll) Version: 1.0.128 -- Release Build+cb657b646daac3e9cc5384ff42ed4530df50eab1
[AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Property, AllowMultiple = true)]
public sealed class UseEscapedNameAttribute : Attribute
Inheritance
Object    Attribute    UseEscapedNameAttribute

Remarks

Applying [UseEscapedName] to a modeled table or field with no parameters will specify that an escaped name be used for all database types. Using a specific database type as a parameter to the attribute, e.g., [UseEscapedName(DatabaseType.SQLServer)], means the escaped name will only be applied to the specific database - however, the attribute allows multiple instances on the same identifier so you could specify that escaping only be applied to two databases, for example: [UseEscapedName(DatabaseType.SQLServer), UseEscapedName(DatabaseType.MySQL)]. In the event multiple attributes have been applied to a modeled identifier where one instance has specified no target database type and others have, the system will assume to target all databases for escaping the name and ignore the specific targets.

Constructors

UseEscapedNameAttribute Creates a new UseEscapedNameAttribute that will request use of escaped name for any database.
UseEscapedNameAttribute(DatabaseType) Creates a new UseEscapedNameAttribute that will request use of escaped name for the specified DatabaseType.

Properties

TargetDatabaseType Gets target DatabaseType for using escaped name.
TypeIdWhen implemented in a derived class, gets a unique identifier for this Attribute.
(Inherited from Attribute)
UseAnsiQuotes Gets or sets flag that determines if double quotes should be used as the identifier delimiter, per SQL-99 standard, regardless of database type. Defaults to true except for MySQL.

Methods

EqualsReturns a value that indicates whether this instance is equal to a specified object.
(Inherited from Attribute)
GetHashCodeReturns the hash code for this instance.
(Inherited from Attribute)
GetTypeGets the Type of the current instance.
(Inherited from Object)
IsDefaultAttributeWhen overridden in a derived class, indicates whether the value of this instance is the default value for the derived class.
(Inherited from Attribute)
MatchWhen overridden in a derived class, returns a value that indicates whether this instance equals a specified object.
(Inherited from Attribute)
ToStringReturns a string that represents the current object.
(Inherited from Object)

See Also