Merge pull request #966 from ermshiperete/bug-xamarin-18511
[mono.git] / mcs / class / System.Data / Documentation / en / Microsoft.SqlServer.Server / SqlFunctionAttribute.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <Type Name="SqlFunctionAttribute" FullName="Microsoft.SqlServer.Server.SqlFunctionAttribute">
3   <TypeSignature Language="C#" Value="public class SqlFunctionAttribute : Attribute" />
4   <AssemblyInfo>
5     <AssemblyName>System.Data</AssemblyName>
6     <AssemblyVersion>2.0.0.0</AssemblyVersion>
7   </AssemblyInfo>
8   <Base>
9     <BaseTypeName>System.Attribute</BaseTypeName>
10   </Base>
11   <Interfaces />
12   <Attributes>
13     <Attribute>
14       <AttributeName>System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)</AttributeName>
15     </Attribute>
16   </Attributes>
17   <Docs>
18     <remarks>To be added.</remarks>
19     <since version=".NET 2.0" />
20     <summary>
21       <attribution license="cc4" from="Microsoft" modified="false" />
22       <para>Used to mark a method definition of a user-defined aggregate as a function in SQL Server. The properties on the attribute reflect the physical characteristics used when the type is registered with SQL Server.</para>
23     </summary>
24   </Docs>
25   <Members>
26     <Member MemberName=".ctor">
27       <MemberSignature Language="C#" Value="public SqlFunctionAttribute ();" />
28       <MemberType>Constructor</MemberType>
29       <Parameters />
30       <Docs>
31         <remarks>To be added.</remarks>
32         <since version=".NET 2.0" />
33         <summary>
34           <attribution license="cc4" from="Microsoft" modified="false" />
35           <para>An optional attribute on a user-defined aggregate, used to indicate that the method should be registered in SQL Server as a function. Also used to set the <see cref="P:Microsoft.SqlServer.Server.SqlFunctionAttribute.DataAccess" />, <see cref="P:Microsoft.SqlServer.Server.SqlFunctionAttribute.FillRowMethodName" />, <see cref="P:Microsoft.SqlServer.Server.SqlFunctionAttribute.IsDeterministic" />, <see cref="P:Microsoft.SqlServer.Server.SqlFunctionAttribute.IsPrecise" />, <see cref="P:Microsoft.SqlServer.Server.SqlFunctionAttribute.Name" />, <see cref="P:Microsoft.SqlServer.Server.SqlFunctionAttribute.SystemDataAccess" />, and <see cref="P:Microsoft.SqlServer.Server.SqlFunctionAttribute.TableDefinition" /> properties of the function attribute.</para>
36         </summary>
37       </Docs>
38       <AssemblyInfo>
39         <AssemblyVersion>2.0.0.0</AssemblyVersion>
40       </AssemblyInfo>
41     </Member>
42     <Member MemberName="DataAccess">
43       <MemberSignature Language="C#" Value="public Microsoft.SqlServer.Server.DataAccessKind DataAccess { set; get; }" />
44       <MemberType>Property</MemberType>
45       <ReturnValue>
46         <ReturnType>Microsoft.SqlServer.Server.DataAccessKind</ReturnType>
47       </ReturnValue>
48       <Docs>
49         <value>To be added.</value>
50         <since version=".NET 2.0" />
51         <remarks>
52           <attribution license="cc4" from="Microsoft" modified="false" />
53           <para>The default is <see cref="F:Microsoft.SqlServer.Server.DataAccessKind.None" />.<see cref="P:Microsoft.SqlServer.Server.SqlFunctionAttribute.DataAccess" /> is also required when connecting to remote servers if transactions integration is required (the default). </para>
54           <para>If a Transact-SQL query is executed from inside a table-valued function (TVF), the <see cref="T:Microsoft.SqlServer.Server.DataAccessKind" />.Read property should be set.</para>
55         </remarks>
56         <summary>
57           <attribution license="cc4" from="Microsoft" modified="false" />
58           <para>Indicates whether the function involves access to user data stored in the local instance of SQL Server.</para>
59         </summary>
60       </Docs>
61       <AssemblyInfo>
62         <AssemblyVersion>2.0.0.0</AssemblyVersion>
63       </AssemblyInfo>
64     </Member>
65     <Member MemberName="IsDeterministic">
66       <MemberSignature Language="C#" Value="public bool IsDeterministic { set; get; }" />
67       <MemberType>Property</MemberType>
68       <ReturnValue>
69         <ReturnType>System.Boolean</ReturnType>
70       </ReturnValue>
71       <Docs>
72         <value>To be added.</value>
73         <since version=".NET 2.0" />
74         <remarks>
75           <attribution license="cc4" from="Microsoft" modified="false" />
76           <para>A user-defined function is said to be deterministic if it always produces the same output values given the same input values and the same database state.</para>
77           <para>The <see cref="P:Microsoft.SqlServer.Server.SqlFunctionAttribute.IsDeterministic" /> property is also useful for indexing the result of the function in the form of indexed computed columns and indexed views. If this property is not specified, the function is assumed to be non-deterministic.</para>
78           <para>Functions that access local data can be deterministic. The data access characteristic is captured separately by the <see cref="P:Microsoft.SqlServer.Server.SqlFunctionAttribute.DataAccess" /> and <see cref="P:Microsoft.SqlServer.Server.SqlFunctionAttribute.SystemDataAccess" /> properties.</para>
79           <para>Note that data access to remote servers (for example, using a <see cref="T:System.Data.SqlClient.SqlConnection" /> to connect to another SQL Server instance) is available in user-defined functions. However, you must still honor the <see cref="P:Microsoft.SqlServer.Server.SqlFunctionAttribute.IsDeterministic" /> declaration. If the common language runtime (CLR) function is marked as deterministic, it should not cause side-effects in the remote server. While side-effects against the context connection are restricted, SQL Server will not enforce the restriction for side-effects over remote connections.</para>
80           <para>The default value of this attribute is false.</para>
81           <para>Do not mark a function as deterministic if the function does not always produce the same output values, given the same input values and the same database state. Marking a function as deterministic when the function is not truly deterministic can result in corrupted indexed views and computed columns.</para>
82         </remarks>
83         <summary>
84           <attribution license="cc4" from="Microsoft" modified="false" />
85           <para>Indicates whether the user-defined function is deterministic.</para>
86         </summary>
87       </Docs>
88       <AssemblyInfo>
89         <AssemblyVersion>2.0.0.0</AssemblyVersion>
90       </AssemblyInfo>
91     </Member>
92     <Member MemberName="IsPrecise">
93       <MemberSignature Language="C#" Value="public bool IsPrecise { set; get; }" />
94       <MemberType>Property</MemberType>
95       <ReturnValue>
96         <ReturnType>System.Boolean</ReturnType>
97       </ReturnValue>
98       <Docs>
99         <value>To be added.</value>
100         <since version=".NET 2.0" />
101         <remarks>
102           <attribution license="cc4" from="Microsoft" modified="false" />
103           <para>Precision of a function is one of the properties used to determine if computed columns that use this function can be indexed. </para>
104           <para>The default value of this attribute is false.</para>
105         </remarks>
106         <summary>
107           <attribution license="cc4" from="Microsoft" modified="false" />
108           <para>Indicates whether the function involves imprecise computations, such as floating point operations.</para>
109         </summary>
110       </Docs>
111       <AssemblyInfo>
112         <AssemblyVersion>2.0.0.0</AssemblyVersion>
113       </AssemblyInfo>
114     </Member>
115     <Member MemberName="SystemDataAccess">
116       <MemberSignature Language="C#" Value="public Microsoft.SqlServer.Server.SystemDataAccessKind SystemDataAccess { set; get; }" />
117       <MemberType>Property</MemberType>
118       <ReturnValue>
119         <ReturnType>Microsoft.SqlServer.Server.SystemDataAccessKind</ReturnType>
120       </ReturnValue>
121       <Docs>
122         <value>To be added.</value>
123         <since version=".NET 2.0" />
124         <remarks>
125           <attribution license="cc4" from="Microsoft" modified="false" />
126           <para>The default is <see cref="F:Microsoft.SqlServer.Server.SystemDataAccessKind.None" />.</para>
127         </remarks>
128         <summary>
129           <attribution license="cc4" from="Microsoft" modified="false" />
130           <para>Indicates whether the function requires access to data stored in the system catalogs or virtual system tables of SQL Server.</para>
131         </summary>
132       </Docs>
133       <AssemblyInfo>
134         <AssemblyVersion>2.0.0.0</AssemblyVersion>
135       </AssemblyInfo>
136     </Member>
137   </Members>
138 </Type>