Table of Contents

Class XmlSchema.SelectiveXmlIndexPath

Namespace
LinqToDB.Tools.DataProvider.SqlServer.Schemas
Assembly
linq2db.Tools.dll

sys.selective_xml_index_paths (Transact-SQL)

Applies to: √ SQL Server (all supported versions)

Available beginning in SQL Server 2012 (11.x) Service Pack 1, each row in sys.selective_xml_index_paths represents one promoted path for particular selective xml index.
If you create a selective xml index on xmlcol of table T using following statement,

CREATE SELECTIVE XML INDEX sxi1 ON T(xmlcol) 
FOR ( path1 = '/a/b/c' AS XQUERY 'xs:string',
    path2 = '/a/b/d' AS XQUERY 'xs:double'
  )

There will be two new rows in sys.selective_xml_index_paths corresponding to the index sxi1.


See sys.selective_xml_index_paths.

[Table(Schema = "sys", Name = "selective_xml_index_paths", IsView = true)]
public class XmlSchema.SelectiveXmlIndexPath
Inheritance
XmlSchema.SelectiveXmlIndexPath
Extension Methods

Properties

CollationName

Name of the collation of the type if it is character-based. Otherwise, NULL.

[Column("collation_name")]
[Nullable]
public string? CollationName { get; set; }

Property Value

string

IndexID

Unique id of the selective xml index.

[Column("index_id")]
[NotNull]
public int IndexID { get; set; }

Property Value

int

IsNode

0 = node() hint not present.

1 = node() optimization hint applied.

[Column("is_node")]
[Nullable]
public bool? IsNode { get; set; }

Property Value

bool?

IsSingleton

0 = SINGLETON hint not present.

1 = SINGLETON optimization hint applied.

[Column("is_singleton")]
[Nullable]
public bool? IsSingleton { get; set; }

Property Value

bool?

IsXqueryMaxLengthInferred

1 = maximum length is inferred.

[Column("is_xquery_max_length_inferred")]
[Nullable]
public bool? IsXqueryMaxLengthInferred { get; set; }

Property Value

bool?

IsXqueryTypeInferred

1 = type is inferred.

[Column("is_xquery_type_inferred")]
[Nullable]
public bool? IsXqueryTypeInferred { get; set; }

Property Value

bool?

MaxLength

Max Length (in bytes) of the type.

-1 = Column data type is varchar(max), nvarchar(max), varbinary(max), or xml.

[Column("max_length")]
[Nullable]
public short? MaxLength { get; set; }

Property Value

short?

Name

Path name.

[Column("name")]
[Nullable]
public string? Name { get; set; }

Property Value

string

Object

objects (sys.objects)

[Association(ThisKey = "ObjectID", OtherKey = "ObjectID", CanBeNull = false)]
public ObjectSchema.Object Object { get; set; }

Property Value

ObjectSchema.Object

ObjectID

ID of table with XML column.

[Column("object_id")]
[NotNull]
public int ObjectID { get; set; }

Property Value

int

Path

Promoted path. For example, '/a/b/c/d/e'.

[Column("path")]
[Nullable]
public string? Path { get; set; }

Property Value

string

PathID

Promoted XML path id.

[Column("path_id")]
[Nullable]
public int? PathID { get; set; }

Property Value

int?

PathType

0 = XQUERY

1 = SQL

[Column("path_type")]
[Nullable]
public byte? PathType { get; set; }

Property Value

byte?

PathTypeDesc

Based on path_type value 'XQUERY' or 'SQL'.

[Column("path_type_desc")]
[Nullable]
public string? PathTypeDesc { get; set; }

Property Value

string

Precision

Maximum precision of the type if it is numeric-based. Otherwise 0.

[Column("precision")]
[Nullable]
public byte? Precision { get; set; }

Property Value

byte?

Scale

Maximum scale of the type if it is numeric-based. Otherwise, 0.

[Column("scale")]
[Nullable]
public byte? Scale { get; set; }

Property Value

byte?

SystemTypeID

ID of the system type of the column.

[Column("system_type_id")]
[Nullable]
public byte? SystemTypeID { get; set; }

Property Value

byte?

UserTypeID

ID of the user type of the column.

[Column("user_type_id")]
[Nullable]
public byte? UserTypeID { get; set; }

Property Value

byte?

XmlComponentID

Unique ID of the XML schema component in the database.

[Column("xml_component_id")]
[Nullable]
public int? XmlComponentID { get; set; }

Property Value

int?

XqueryMaxLength

Max length (in character of xsd type).

[Column("xquery_max_length")]
[Nullable]
public short? XqueryMaxLength { get; set; }

Property Value

short?

XqueryTypeDescription

Name of the specified xsd type.

[Column("xquery_type_description")]
[Nullable]
public string? XqueryTypeDescription { get; set; }

Property Value

string