PgQualifiedNameBuilder
Namespace: Ankus
Assembly: Ankus.Runtime.dll
Builds an exact sequence of PostgreSQL name components for native operator lookup.
public sealed class PgQualifiedNameBuilder : IReadOnlyList<string>, IReadOnlyCollection<string>, IEnumerable<string>, IEnumerableComponents are unquoted catalog identifiers, never parsed, split, trimmed or case-folded. The managed builder is reusable and needs no backend until lookup. It is not thread-safe.
Inheritance: object
Implements: IReadOnlyList<string>, IReadOnlyCollection<string>, IEnumerable<string>, IEnumerable
Constructors
Section titled “Constructors”PgQualifiedNameBuilder()
Section titled “PgQualifiedNameBuilder()”public PgQualifiedNameBuilder()Methods
Section titled “Methods”Add(string)
Section titled “Add(string)”Appends one exact name component without interpreting SQL quoting or punctuation.
public PgQualifiedNameBuilder Add(string value)Parameters:
value — string
The component, including an empty string if desired.
Returns: PgQualifiedNameBuilder
This builder for fluent construction.
Exceptions:
- ArgumentNullException: The component is null.
- ArgumentException: The component contains a zero character.
- EncoderFallbackException: The component contains invalid UTF-16.
GetEnumerator()
Section titled “GetEnumerator()”Enumerates components in insertion order.
public IEnumerator<string> GetEnumerator()Returns: IEnumerator<string>
The component enumerator.
GetOperatorOid(uint, uint)
Section titled “GetOperatorOid(uint, uint)”Resolves an operator with exactly the supplied argument type OIDs using PostgreSQL’s current namespace rules.
public uint GetOperatorOid(uint leftTypeOid, uint rightTypeOid)Parameters:
leftTypeOid — uint
The left argument type, or zero for a prefix operator.
rightTypeOid — uint
The right argument type; zero permits legacy postfix lookup where the server supports it.
Returns: uint
The current operator OID, or zero when the exact operator or explicit schema is absent.
One component follows search_path, two specify schema and operator, and three also specify the current database. PostgreSQL reports invalid name counts, foreign databases and schema permission errors as PgException. Lookup does not coerce argument types, consume this builder, cache OIDs, or retain native storage.
Properties
Section titled “Properties”Gets the number of name components.
public int Count { get; }Value: int
this[int]
Section titled “this[int]”Gets one exact component in insertion order.
public string this[int index] { get; }Parameters:
index — int
The zero-based component index.
Value: string
The component.