SqlFunctionAttribute クラス

定義

ユーザー定義集計のメソッド定義を SQL Server の関数として宣言する場合に使用します。 この属性には、型を SQL Server に登録する際に使用される物理的な特性を反映した、いくつかのプロパティが格納されます。

public ref class SqlFunctionAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)]
public class SqlFunctionAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)]
[System.Serializable]
public class SqlFunctionAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)>]
type SqlFunctionAttribute = class
    inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)>]
[<System.Serializable>]
type SqlFunctionAttribute = class
    inherit Attribute
Public Class SqlFunctionAttribute
Inherits Attribute
継承
SqlFunctionAttribute
派生
属性

次の例は、指定したディレクトリ パス内のファイルの一覧を返す集計関数を示しています。

コンストラクター

SqlFunctionAttribute()

ユーザー定義集計に対するオプションの属性。ユーザー定義集計のメソッドを SQL Server に関数として登録する場合に使用します。 関数の属性に対し、DataAccessFillRowMethodNameIsDeterministicIsPreciseNameSystemDataAccessTableDefinition の各プロパティを設定する場合にも使用します。

プロパティ

DataAccess

その関数が、SQL Server のローカル インスタンスに格納されたユーザー データにアクセスするかどうかを示します。

FillRowMethodName

テーブル値関数によって返されるテーブル内のデータ行の設定に使用される、同じクラスのメソッドの名前。

IsDeterministic

ユーザー定義関数が決定的であるかどうかを示します。

IsPrecise

浮動小数点演算など、厳密な結果が算出されない計算が関数に含まれているかどうかを示します。

Name

関数を SQL Server に登録する際に使用する名前。

SystemDataAccess

その関数で、SQL Server のシステム カタログまたは仮想システム テーブルに格納されたデータにアクセスする必要があるかどうかを示します。

TableDefinition

メソッドをテーブル値関数 (TVF) として使用する場合、結果のテーブル定義を表す文字列。

適用対象