Table of Contents

Struct NpgsqlTsVector.Lexeme.WordEntryPos

Namespace
NpgsqlTypes
Assembly
Npgsql.dll

Represents a word entry position and an optional weight.

public struct NpgsqlTsVector.Lexeme.WordEntryPos : IEquatable<NpgsqlTsVector.Lexeme.WordEntryPos>
Implements
Inherited Members

Constructors

WordEntryPos(int, Weight)

Creates a WordEntryPos with a given position and weight.

public WordEntryPos(int pos, NpgsqlTsVector.Lexeme.Weight weight = Weight.D)

Parameters

pos int

Position values can range from 1 to 16383; larger numbers are silently set to 16383.

weight NpgsqlTsVector.Lexeme.Weight

A weight labeled between A and D.

Properties

Pos

The position is a 14-bit unsigned integer indicating the position in the text this lexeme occurs. Cannot be 0.

public int Pos { get; }

Property Value

int

Weight

The weight is labeled from A to D. D is the default, and not printed.

public NpgsqlTsVector.Lexeme.Weight Weight { get; }

Property Value

NpgsqlTsVector.Lexeme.Weight

Methods

Equals(WordEntryPos)

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

public bool Equals(NpgsqlTsVector.Lexeme.WordEntryPos o)

Parameters

o NpgsqlTsVector.Lexeme.WordEntryPos

Returns

bool

Equals(object?)

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

public override bool Equals(object? o)

Parameters

o object

Returns

bool

GetHashCode()

Gets a hash code for the current object.

public override int GetHashCode()

Returns

int

ToString()

Prints this lexeme in PostgreSQL's format, i.e. position is followed by weight (weight is only printed if A, B or C).

public override string ToString()

Returns

string

Operators

operator ==(WordEntryPos, WordEntryPos)

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

public static bool operator ==(NpgsqlTsVector.Lexeme.WordEntryPos left, NpgsqlTsVector.Lexeme.WordEntryPos right)

Parameters

left NpgsqlTsVector.Lexeme.WordEntryPos
right NpgsqlTsVector.Lexeme.WordEntryPos

Returns

bool

operator !=(WordEntryPos, WordEntryPos)

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

public static bool operator !=(NpgsqlTsVector.Lexeme.WordEntryPos left, NpgsqlTsVector.Lexeme.WordEntryPos right)

Parameters

left NpgsqlTsVector.Lexeme.WordEntryPos
right NpgsqlTsVector.Lexeme.WordEntryPos

Returns

bool