Search Results for

    Show / Hide Table of Contents

    Struct LTree

    Represents a PostgreSQL ltree type. This type is implicitly convertible to a .NET String.

    Implements
    IEquatable<LTree>
    Inherited Members
    Object.Equals(Object, Object)
    Object.GetType()
    Object.ReferenceEquals(Object, Object)
    Namespace: Microsoft.EntityFrameworkCore
    Assembly: Npgsql.EntityFrameworkCore.PostgreSQL.dll
    Syntax
    public readonly struct LTree : IEquatable<LTree>
    Remarks

    See https://www.postgresql.org/docs/current/ltree.html

    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.

    Remarks

    See https://www.postgresql.org/docs/current/ltree.html

    Properties

    | Improve this Doc View Source

    NLevel

    Returns number of labels in path.

    Declaration
    public readonly int NLevel { get; }
    Property Value
    Type Description
    Int32
    Remarks

    The property is translated to nlevel(ltree).

    See https://www.postgresql.org/docs/current/ltree.html

    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
    Type Description
    Boolean
    Remarks

    See https://www.postgresql.org/docs/current/ltree.html

    | 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
    Type Description
    Boolean
    Overrides
    ValueType.Equals(Object)
    Remarks

    See https://www.postgresql.org/docs/current/ltree.html

    | 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
    Type Description
    Int32
    Overrides
    ValueType.GetHashCode()
    Remarks

    See https://www.postgresql.org/docs/current/ltree.html

    | 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
    Type Name Description
    LTree other
    Int32 offset
    Returns
    Type Description
    Int32
    Remarks

    The method call is translated to index(ltree1, ltree2, offset).

    See https://www.postgresql.org/docs/current/ltree.html

    | 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
    Type Description
    Int32
    Remarks

    The method call is translated to index(ltree1, ltree2).

    See https://www.postgresql.org/docs/current/ltree.html

    | 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
    Type Description
    Boolean
    Remarks

    The method call is translated to left @> right.

    See https://www.postgresql.org/docs/current/ltree.html

    | 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
    Type Description
    Boolean
    Remarks

    The method call is translated to left &lt;@ right.

    See https://www.postgresql.org/docs/current/ltree.html

    | 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
    Type Description
    LTree
    Remarks

    The method call is translated to lca(others).

    See https://www.postgresql.org/docs/current/ltree.html

    | 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
    Type Description
    Boolean
    Remarks

    The method call is translated to left ~ right.

    See https://www.postgresql.org/docs/current/ltree.html

    | 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
    Type Description
    Boolean
    Remarks

    The method call is translated to left @ right.

    See https://www.postgresql.org/docs/current/ltree.html

    | 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
    Type Name Description
    Int32 offset
    Int32 len
    Returns
    Type Description
    LTree
    Remarks

    The method call is translated to subpath(ltree, offset, len).

    See https://www.postgresql.org/docs/current/ltree.html

    | 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
    Type Description
    LTree
    Remarks

    The method call is translated to subpath(ltree, offset).

    See https://www.postgresql.org/docs/current/ltree.html

    | 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
    Type Name Description
    Int32 start
    Int32 end
    Returns
    Type Description
    LTree
    Remarks

    The method call is translated to subltree(ltree, start, end).

    See https://www.postgresql.org/docs/current/ltree.html

    | 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
    Type Description
    String
    Overrides
    ValueType.ToString()
    Remarks

    See https://www.postgresql.org/docs/current/ltree.html

    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
    Type Name Description
    LTree x
    LTree y
    Returns
    Type Description
    Boolean
    Remarks

    See https://www.postgresql.org/docs/current/ltree.html

    | 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
    Type Description
    String
    Remarks

    See https://www.postgresql.org/docs/current/ltree.html

    | 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
    Type Description
    LTree
    Remarks

    See https://www.postgresql.org/docs/current/ltree.html

    | Improve this Doc View Source

    Inequality(LTree, LTree)

    Compares two LTree instances for inequality.

    Declaration
    public static bool operator !=(LTree x, LTree y)
    Parameters
    Type Name Description
    LTree x
    LTree y
    Returns
    Type Description
    Boolean
    Remarks

    See https://www.postgresql.org/docs/current/ltree.html

    Implements

    System.IEquatable<T>
    • Improve this Doc
    • View Source
    In This Article
    Back to top © Copyright 2022 The Npgsql Development Team