1 <?xml version="1.0" encoding="utf-8"?>
2 <Type Name="SqlUserDefinedAggregateAttribute" FullName="Microsoft.SqlServer.Server.SqlUserDefinedAggregateAttribute">
3 <TypeSignature Language="C#" Value="public sealed class SqlUserDefinedAggregateAttribute : Attribute" />
5 <AssemblyName>System.Data</AssemblyName>
6 <AssemblyVersion>2.0.0.0</AssemblyVersion>
9 <BaseTypeName>System.Attribute</BaseTypeName>
14 <AttributeName>System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Struct, AllowMultiple=false, Inherited=false)</AttributeName>
18 <since version=".NET 2.0" />
20 <attribution license="cc4" from="Microsoft" modified="false" />
21 <para>SQL Server creates a user-defined aggregate that is bound to the class definition that has the <see cref="T:Microsoft.SqlServer.Server.SqlUserDefinedAggregateAttribute" /> custom attribute. Every user-defined aggregate must be annotated with this attribute.</para>
22 <para>See "CLR User-Defined Aggregates" in SQL Server 2005 Books Online for more information on user-defined aggregates and examples.</para>
25 <attribution license="cc4" from="Microsoft" modified="false" />
26 <para>Indicates that the type should be registered as a user-defined aggregate. The properties on the attribute reflect the physical attributes used when the type is registered with SQL Server. This class cannot be inherited.</para>
30 <Member MemberName=".ctor">
31 <MemberSignature Language="C#" Value="public SqlUserDefinedAggregateAttribute (Microsoft.SqlServer.Server.Format f);" />
32 <MemberType>Constructor</MemberType>
34 <Parameter Name="f" Type="Microsoft.SqlServer.Server.Format" />
37 <param name="f">To be added.</param>
38 <remarks>To be added.</remarks>
39 <since version=".NET 2.0" />
41 <attribution license="cc4" from="Microsoft" modified="false" />
42 <para>A required attribute on a user-defined aggregate, used to indicate that the given type is a user-defined aggregate and the storage format of the user-defined aggregate.</para>
46 <AssemblyVersion>2.0.0.0</AssemblyVersion>
49 <Member MemberName="Format">
50 <MemberSignature Language="C#" Value="public Microsoft.SqlServer.Server.Format Format { get; }" />
51 <MemberType>Property</MemberType>
53 <ReturnType>Microsoft.SqlServer.Server.Format</ReturnType>
56 <value>To be added.</value>
57 <remarks>To be added.</remarks>
58 <since version=".NET 2.0" />
60 <attribution license="cc4" from="Microsoft" modified="false" />
61 <para>The serialization format as a <see cref="T:Microsoft.SqlServer.Server.Format" />.</para>
65 <AssemblyVersion>2.0.0.0</AssemblyVersion>
68 <Member MemberName="IsInvariantToDuplicates">
69 <MemberSignature Language="C#" Value="public bool IsInvariantToDuplicates { set; get; }" />
70 <MemberType>Property</MemberType>
72 <ReturnType>System.Boolean</ReturnType>
75 <value>To be added.</value>
76 <since version=".NET 2.0" />
78 <attribution license="cc4" from="Microsoft" modified="false" />
79 <para>Used by the query processor, this property is true if the aggregate is invariant to duplicates. That is, the aggregate of S, {X} is the same as aggregate of S when X is already in S. For example, aggregate functions such as MIN and MAX satisfy this property, while SUM does not.</para>
80 <para>Incorrectly setting this property can result in incorrect query results. This property is not an optimizer hint; it affects both the plan selected and the results returned by the query.</para>
83 <attribution license="cc4" from="Microsoft" modified="false" />
84 <para>Indicates whether the aggregate is invariant to duplicates.</para>
88 <AssemblyVersion>2.0.0.0</AssemblyVersion>
91 <Member MemberName="IsInvariantToNulls">
92 <MemberSignature Language="C#" Value="public bool IsInvariantToNulls { set; get; }" />
93 <MemberType>Property</MemberType>
95 <ReturnType>System.Boolean</ReturnType>
98 <value>To be added.</value>
99 <since version=".NET 2.0" />
101 <attribution license="cc4" from="Microsoft" modified="false" />
102 <para>Used by the query processor, this property is true if the aggregate is invariant to nulls. That is, the aggregate of S, {NULL} is the same as aggregate of S. For example, aggregate functions such as MIN and MAX satisfy this property, while COUNT(*) does not.</para>
103 <para>Incorrectly setting this property can result in incorrect query results. This property is not an optimizer hint; it affects the plan selected and the results returned by the query.</para>
106 <attribution license="cc4" from="Microsoft" modified="false" />
107 <para>Indicates whether the aggregate is invariant to nulls.</para>
111 <AssemblyVersion>2.0.0.0</AssemblyVersion>
114 <Member MemberName="IsInvariantToOrder">
115 <MemberSignature Language="C#" Value="public bool IsInvariantToOrder { set; get; }" />
116 <MemberType>Property</MemberType>
118 <ReturnType>System.Boolean</ReturnType>
121 <value>To be added.</value>
122 <since version=".NET 2.0" />
124 <attribution license="cc4" from="Microsoft" modified="false" />
125 <para>Reserved for future use. This property is not currently used by the query processor: order is currently not guaranteed.</para>
126 <para>Incorrectly setting this property can result in incorrect query results. This property is not an optimizer hint; it affects the plan selected and the results returned by the query.</para>
127 <para>The default value for this property is false.</para>
130 <attribution license="cc4" from="Microsoft" modified="false" />
131 <para>Indicates whether the aggregate is invariant to order.</para>
135 <AssemblyVersion>2.0.0.0</AssemblyVersion>
138 <Member MemberName="IsNullIfEmpty">
139 <MemberSignature Language="C#" Value="public bool IsNullIfEmpty { set; get; }" />
140 <MemberType>Property</MemberType>
142 <ReturnType>System.Boolean</ReturnType>
145 <value>To be added.</value>
146 <since version=".NET 2.0" />
148 <attribution license="cc4" from="Microsoft" modified="false" />
149 <para>Used by the query processor, this property is true if the aggregate returns null if no values have been accumulated.</para>
150 <para>Incorrectly setting this property can result in incorrect query results. This property is not an optimizer hint; it affects the plan selected and the results returned by the query.</para>
153 <attribution license="cc4" from="Microsoft" modified="false" />
154 <para>Indicates whether the aggregate returns null if no values have been accumulated.</para>
158 <AssemblyVersion>2.0.0.0</AssemblyVersion>
161 <Member MemberName="MaxByteSize">
162 <MemberSignature Language="C#" Value="public int MaxByteSize { set; get; }" />
163 <MemberType>Property</MemberType>
165 <ReturnType>System.Int32</ReturnType>
168 <value>To be added.</value>
169 <since version=".NET 2.0" />
171 <attribution license="cc4" from="Microsoft" modified="false" />
172 <para>This property does not have to be specified for Native format serialization. </para>
173 <para>You must specify the <see cref="P:Microsoft.SqlServer.Server.SqlUserDefinedAggregateAttribute.MaxByteSize" /> property with the UserDefined serialization <see cref="T:Microsoft.SqlServer.Server.Format" />. </para>
174 <para>The maximum allowed value for this property is specified by the <see cref="F:Microsoft.SqlServer.Server.SqlUserDefinedAggregateAttribute.MaxByteSizeValue" /> field.</para>
175 <para>The maximum size allowed is 2 gigabytes (GB). You can specify a number from 1 to 8000 bytes, or -1 to represent a value larger than 8000 bytes, up to 2 gigabytes.</para>
176 <para>For an aggregate with user-defined serialization specified, <see cref="P:Microsoft.SqlServer.Server.SqlUserDefinedAggregateAttribute.MaxByteSize" /> refers to the total size of the serialized data. Consider an aggregate serializing a string of 10 characters (<see cref="T:System.Char" />). When the string is serialized using a <see cref="T:System.IO.BinaryWriter" />, the total size of the serialized string is 22 bytes: 2 bytes per Unicode UTF-16 character, multiplied by the maximum number of characters, plus 2 control bytes of overhead incurred from serializing a binary stream. So, when determining the value of <see cref="P:Microsoft.SqlServer.Server.SqlUserDefinedAggregateAttribute.MaxByteSize" />, the total size of the serialized data must be considered: the size of the data serialized in binary form plus the overhead incurred by serialization.</para>
179 <attribution license="cc4" from="Microsoft" modified="false" />
180 <para>The maximum size, in bytes, of the aggregate instance.</para>
184 <AssemblyVersion>2.0.0.0</AssemblyVersion>
187 <Member MemberName="MaxByteSizeValue">
188 <MemberSignature Language="C#" Value="public const int MaxByteSizeValue = 8000;" />
189 <MemberType>Field</MemberType>
191 <ReturnType>System.Int32</ReturnType>
193 <MemberValue>8000</MemberValue>
195 <since version=".NET 2.0" />
197 <attribution license="cc4" from="Microsoft" modified="false" />
198 <para>An <see cref="T:System.Int32" /> value representing the maximum size of the aggregate instance.</para>
201 <attribution license="cc4" from="Microsoft" modified="false" />
202 <para>The maximum size, in bytes, required to store the state of this aggregate instance during computation.</para>
206 <AssemblyVersion>2.0.0.0</AssemblyVersion>