Table of Contents

Class NpgsqlTsVector

Namespace
NpgsqlTypes
Assembly
Npgsql.dll

Represents a PostgreSQL tsvector.

public sealed class NpgsqlTsVector : IEnumerable<NpgsqlTsVector.Lexeme>, IEnumerable, IEquatable<NpgsqlTsVector>
Inheritance
NpgsqlTsVector
Implements
Inherited Members

Properties

Count

Gets the number of lexemes.

public int Count { get; }

Property Value

int

this[int]

Returns the lexeme at a specific index

public NpgsqlTsVector.Lexeme this[int index] { get; }

Parameters

index int

Property Value

NpgsqlTsVector.Lexeme

Methods

Equals(NpgsqlTsVector?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(NpgsqlTsVector? other)

Parameters

other NpgsqlTsVector

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetEnumerator()

Returns an enumerator.

public IEnumerator<NpgsqlTsVector.Lexeme> GetEnumerator()

Returns

IEnumerator<NpgsqlTsVector.Lexeme>

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

Parse(string)

Parses a tsvector in PostgreSQL's text format.

[Obsolete("Client-side parsing of NpgsqlTsVector is unreliable and cannot fully duplicate the PostgreSQL logic. Use PG functions instead (e.g. to_tsvector)")]
public static NpgsqlTsVector Parse(string value)

Parameters

value string

Returns

NpgsqlTsVector

ToString()

Gets a string representation in PostgreSQL's format.

public override string ToString()

Returns

string