Struct LTree
Represents a PostgreSQL ltree type. This type is implicitly convertible to a .NET String.
Assembly: Npgsql.EntityFrameworkCore.PostgreSQL.dll
Syntax
public readonly struct LTree : IEquatable<LTree>
Constructors
|
Improve this Doc
View Source
LTree(String)
Constructs a new instance of LTree.
Declaration
public LTree(string value)
Parameters
Type |
Name |
Description |
String |
value |
The string value for the ltree.
|
Properties
|
Improve this Doc
View Source
NLevel
Returns number of labels in path.
Declaration
public readonly int NLevel { get; }
Property Value
Methods
|
Improve this Doc
View Source
Equals(LTree)
Represents a PostgreSQL ltree type. This type is implicitly convertible to a .NET String.
Declaration
public readonly bool Equals(LTree other)
Parameters
Type |
Name |
Description |
LTree |
other |
|
Returns
|
Improve this Doc
View Source
Equals(Object)
Represents a PostgreSQL ltree type. This type is implicitly convertible to a .NET String.
Declaration
public override readonly bool Equals(object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
Returns
Overrides
|
Improve this Doc
View Source
GetHashCode()
Represents a PostgreSQL ltree type. This type is implicitly convertible to a .NET String.
Declaration
public override readonly int GetHashCode()
Returns
Overrides
|
Improve this Doc
View Source
Index(LTree, Int32)
Returns position of first occurrence of other
in this ltree, or -1 if not found.
The search starts at position offset
; negative offset means start -offset labels from the end of the path.
Declaration
public readonly int Index(LTree other, int offset)
Parameters
Returns
|
Improve this Doc
View Source
Index(LTree)
Returns position of first occurrence of other
in this ltree, or -1 if not found.
Declaration
public readonly int Index(LTree other)
Parameters
Type |
Name |
Description |
LTree |
other |
|
Returns
|
Improve this Doc
View Source
IsAncestorOf(LTree)
Returns whether this ltree is an ancestor of other
(or equal).
Declaration
public readonly bool IsAncestorOf(LTree other)
Parameters
Type |
Name |
Description |
LTree |
other |
|
Returns
|
Improve this Doc
View Source
IsDescendantOf(LTree)
Returns whether this ltree is a descendant of other
(or equal).
Declaration
public readonly bool IsDescendantOf(LTree other)
Parameters
Type |
Name |
Description |
LTree |
other |
|
Returns
|
Improve this Doc
View Source
LongestCommonAncestor(LTree[])
Computes longest common ancestor of paths.
Declaration
public static LTree LongestCommonAncestor(params LTree[] others)
Parameters
Type |
Name |
Description |
LTree[] |
others |
|
Returns
|
Improve this Doc
View Source
MatchesLQuery(String)
Returns whether this ltree matches lquery
.
Declaration
public readonly bool MatchesLQuery(string lquery)
Parameters
Type |
Name |
Description |
String |
lquery |
|
Returns
|
Improve this Doc
View Source
MatchesLTxtQuery(String)
Returns whether this ltree matches ltxtquery
.
Declaration
public readonly bool MatchesLTxtQuery(string ltxtquery)
Parameters
Type |
Name |
Description |
String |
ltxtquery |
|
Returns
|
Improve this Doc
View Source
Subpath(Int32, Int32)
Returns subpath of this ltree starting at position offset
, with length len
.
If offset
is negative, subpath starts that far from the end of the path.
If len
is negative, leaves that many labels off the end of the path.
Declaration
public readonly LTree Subpath(int offset, int len)
Parameters
Returns
|
Improve this Doc
View Source
Subpath(Int32)
Returns subpath of ltree starting at position offset
, extending to end of path.
If offset
is negative, subpath starts that far from the end of the path.
Declaration
public readonly LTree Subpath(int offset)
Parameters
Type |
Name |
Description |
Int32 |
offset |
|
Returns
|
Improve this Doc
View Source
Subtree(Int32, Int32)
Returns subpath of this ltree from position start
to position end
-1
(counting from 0).
Declaration
public readonly LTree Subtree(int start, int end)
Parameters
Returns
|
Improve this Doc
View Source
ToString()
Represents a PostgreSQL ltree type. This type is implicitly convertible to a .NET String.
Declaration
public override readonly string ToString()
Returns
Overrides
Operators
|
Improve this Doc
View Source
Equality(LTree, LTree)
Compares two LTree instances for equality.
Declaration
public static bool operator ==(LTree x, LTree y)
Parameters
Returns
|
Improve this Doc
View Source
Implicit(LTree to String)
Converts a string to an LTree type.
Declaration
public static implicit operator string (LTree ltree)
Parameters
Type |
Name |
Description |
LTree |
ltree |
|
Returns
|
Improve this Doc
View Source
Implicit(String to LTree)
Converts an LTree type to a string.
Declaration
public static implicit operator LTree(string value)
Parameters
Type |
Name |
Description |
String |
value |
|
Returns
|
Improve this Doc
View Source
Inequality(LTree, LTree)
Compares two LTree instances for inequality.
Declaration
public static bool operator !=(LTree x, LTree y)
Parameters
Returns
Implements