Class QualifiedName
Represents a qualified name of a database object.
Schema name and object name should conform to SQL syntax rules for identifiers.- Identifier must start from any character in the Unicode General Category classes “Lu”, “Ll”, “Lt”, “Lm”, “Lo”, or “Nl”.
- Identifier character (expect the first one) may be U+00B7 (middle dot), or any character in the Unicode General Category classes “Mn”, “Mc”, “Nd”, “Pc”, or “Cf”.
- Identifier that contains any other characters must be quoted with double-quotes.
- Double-quote inside the identifier must be encoded as 2 consequent double-quote chars.
public sealed record QualifiedName : IEquatable<QualifiedName>
- Inheritance
-
QualifiedName
- Implements
- Inherited Members
Fields
DefaultSchemaName
Default schema name.
public const string DefaultSchemaName = "PUBLIC"
Field Value
QuoteChar
Quote character for identifiers.
public const char QuoteChar = '"'
Field Value
SeparatorChar
Separator character between schema and object names.
public const char SeparatorChar = '.'
Field Value
Properties
CanonicalName
Gets a fully qualified name in canonical form, that is, enclosing each part of the identifier chain in double quotes.
public string CanonicalName { get; }
Property Value
ObjectName
Gets the object name.
public string ObjectName { get; }
Property Value
SchemaName
Gets the schema name.
public string SchemaName { get; }
Property Value
Methods
Of(string?, string)
Creates a new instance of the QualifiedName struct.
public static QualifiedName Of(string? schemaName, string objectName)
Parameters
Returns
- QualifiedName
Qualified name.
Parse(string)
Parses a qualified name from a string.
public static QualifiedName Parse(string simpleOrCanonicalName)
Parameters
simpleOrCanonicalName
stringSimple or canonical name.
Returns
- QualifiedName
Parsed qualified name.