-
Notifications
You must be signed in to change notification settings - Fork 254
/
StoredProcedureRequestOptions.xml
140 lines (139 loc) · 8.36 KB
/
StoredProcedureRequestOptions.xml
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<Type Name="StoredProcedureRequestOptions" FullName="Microsoft.Azure.Cosmos.Scripts.StoredProcedureRequestOptions">
<TypeSignature Language="C#" Value="public class StoredProcedureRequestOptions : Microsoft.Azure.Cosmos.RequestOptions" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit StoredProcedureRequestOptions extends Microsoft.Azure.Cosmos.RequestOptions" />
<TypeSignature Language="DocId" Value="T:Microsoft.Azure.Cosmos.Scripts.StoredProcedureRequestOptions" />
<TypeSignature Language="VB.NET" Value="Public Class StoredProcedureRequestOptions
Inherits RequestOptions" />
<TypeSignature Language="F#" Value="type StoredProcedureRequestOptions = class
 inherit RequestOptions" />
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.16.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>Microsoft.Azure.Cosmos.RequestOptions</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>
The cosmos stored procedure request options
</summary>
<remarks>To be added.</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public StoredProcedureRequestOptions ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.Scripts.StoredProcedureRequestOptions.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.16.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ConsistencyLevel">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.ConsistencyLevel? ConsistencyLevel { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Nullable`1<valuetype Microsoft.Azure.Cosmos.ConsistencyLevel> ConsistencyLevel" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.Scripts.StoredProcedureRequestOptions.ConsistencyLevel" />
<MemberSignature Language="VB.NET" Value="Public Property ConsistencyLevel As Nullable(Of ConsistencyLevel)" />
<MemberSignature Language="F#" Value="member this.ConsistencyLevel : Nullable<Microsoft.Azure.Cosmos.ConsistencyLevel> with get, set" Usage="Microsoft.Azure.Cosmos.Scripts.StoredProcedureRequestOptions.ConsistencyLevel" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.16.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Nullable<Microsoft.Azure.Cosmos.ConsistencyLevel></ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets or sets the consistency level required for the request in the Azure Cosmos DB service.
</summary>
<value>
The consistency level required for the request.
</value>
<remarks>
Azure Cosmos DB offers 5 different consistency levels. Strong, Bounded Staleness, Session, Consistent Prefix and Eventual - in order of strongest to weakest consistency. <see cref="T:Microsoft.Azure.Cosmos.ConnectionPolicy" /><para>
While this is set at a database account level, Azure Cosmos DB allows a developer to override the default consistency level
for each individual request.
</para></remarks>
</Docs>
</Member>
<Member MemberName="EnableScriptLogging">
<MemberSignature Language="C#" Value="public bool EnableScriptLogging { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool EnableScriptLogging" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.Scripts.StoredProcedureRequestOptions.EnableScriptLogging" />
<MemberSignature Language="VB.NET" Value="Public Property EnableScriptLogging As Boolean" />
<MemberSignature Language="F#" Value="member this.EnableScriptLogging : bool with get, set" Usage="Microsoft.Azure.Cosmos.Scripts.StoredProcedureRequestOptions.EnableScriptLogging" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.16.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets or sets the <see cref="P:Microsoft.Azure.Cosmos.Scripts.StoredProcedureRequestOptions.EnableScriptLogging" /> for the current request in the Azure Cosmos DB service.
</summary>
<value>To be added.</value>
<remarks>
<para>
EnableScriptLogging is used to enable/disable logging in JavaScript stored procedures.
By default script logging is disabled.
The log can also be accessible in response header (x-ms-documentdb-script-log-results).
</para>
</remarks>
<example>
To log, use the following in store procedure:
<code language="JavaScript"><![CDATA[
console.log("This is trace log");
]]></code></example>
</Docs>
</Member>
<Member MemberName="SessionToken">
<MemberSignature Language="C#" Value="public string SessionToken { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string SessionToken" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.Scripts.StoredProcedureRequestOptions.SessionToken" />
<MemberSignature Language="VB.NET" Value="Public Property SessionToken As String" />
<MemberSignature Language="F#" Value="member this.SessionToken : string with get, set" Usage="Microsoft.Azure.Cosmos.Scripts.StoredProcedureRequestOptions.SessionToken" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.16.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets or sets the token for use with session consistency in the Azure Cosmos DB service.
</summary>
<value>
The token for use with session consistency.
</value>
<remarks>
One of the <see cref="P:Microsoft.Azure.Cosmos.Scripts.StoredProcedureRequestOptions.ConsistencyLevel" /> for Azure Cosmos DB is Session. In fact, this is the default level applied to accounts.
<para>
When working with Session consistency, each new write request to Azure Cosmos DB is assigned a new SessionToken.
The DocumentClient will use this token internally with each read/query request to ensure that the set consistency level is maintained.
<para>
In some scenarios you need to manage this Session yourself;
Consider a web application with multiple nodes, each node will have its own instance of <see cref="T:Microsoft.Azure.Cosmos.DocumentClient" />
If you wanted these nodes to participate in the same session (to be able read your own writes consistently across web tiers)
you would have to send the SessionToken from <see cref="T:Microsoft.Azure.Documents.Client.ResourceResponse`1" /> of the write action on one node
to the client tier, using a cookie or some other mechanism, and have that token flow back to the web tier for subsequent reads.
If you are using a round-robin load balancer which does not maintain session affinity between requests, such as the Azure Load Balancer,
the read could potentially land on a different node to the write request, where the session was created.
</para><para>
If you do not flow the Azure Cosmos DB SessionToken across as described above you could end up with inconsistent read results for a period of time.
</para></para></remarks>
</Docs>
</Member>
</Members>
</Type>