blob: b1af7c80738688e76063672466bed9d3e34433b7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
//------------------------------------------------------------------------------
// <copyright file="SqlFunctionAttribute.cs" company="Microsoft Corporation">
// Copyright (c) Microsoft Corporation. All Rights Reserved.
// Information Contained Herein is Proprietary and Confidential.
// </copyright>
// <owner current="true" primary="true">[....]</owner>
// <owner current="true" primary="true">[....]</owner>
// <owner current="true" primary="true">daltudov</owner>
// <owner current="true" primary="true">[....]</owner>
// <owner current="true" primary="false">beysims</owner>
// <owner current="true" primary="false">[....]</owner>
// <owner current="true" primary="false">vadimt</owner>
//------------------------------------------------------------------------------
using System;
namespace Microsoft.SqlServer.Server {
[Serializable]
public enum DataAccessKind {
None = 0,
Read = 1,
}
[Serializable]
public enum SystemDataAccessKind {
None = 0,
Read = 1,
}
// sql specific attribute
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false), Serializable]
public class SqlFunctionAttribute : System.Attribute {
private bool m_fDeterministic;
private DataAccessKind m_eDataAccess;
private SystemDataAccessKind m_eSystemDataAccess;
private bool m_fPrecise;
private string m_fName;
private string m_fTableDefinition;
private string m_FillRowMethodName;
public SqlFunctionAttribute() {
// default values
m_fDeterministic = false;
m_eDataAccess = DataAccessKind.None;
m_eSystemDataAccess = SystemDataAccessKind.None;
m_fPrecise = false;
m_fName = null;
m_fTableDefinition = null;
m_FillRowMethodName = null;
} // SqlFunctionAttribute
public bool IsDeterministic {
get {
return m_fDeterministic;
}
set {
m_fDeterministic = value;
}
} // Deterministic
public DataAccessKind DataAccess {
get {
return m_eDataAccess;
}
set {
m_eDataAccess = value;
}
} // public bool DataAccessKind
public SystemDataAccessKind SystemDataAccess {
get {
return m_eSystemDataAccess;
}
set {
m_eSystemDataAccess = value;
}
} // public bool SystemDataAccessKind
public bool IsPrecise {
get {
return m_fPrecise;
}
set {
m_fPrecise = value;
}
} // Precise
public string Name {
get {
return m_fName;
}
set {
m_fName = value;
}
}
public string TableDefinition {
get {
return m_fTableDefinition;
}
set {
m_fTableDefinition = value;
}
}
public string FillRowMethodName {
get {
return m_FillRowMethodName;
}
set {
m_FillRowMethodName = value;
}
}
} // class SqlFunctionAttribute
}
|