forked from typedb/typedb-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptions.yml
192 lines (179 loc) · 10.2 KB
/
options.yml
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
title: Options
description:
java: |
The transaction query options object `TypeDBOptions` can be used to override the default server behaviour
query processing. Use `TypeDBOptions.core()` to create a new TypeDB Core options object, or `TypeDBOptions.cluster()`
for TypeDB Cluster.
The options are:
- `infer`: whether to enable inference for the provided query (only settable at transaction level and above, and only affects **read** transactions) (default: `false`)
- `explain`: whether to enable explanations for the provided query (only affects **read** transactions) (default: `false`)
- `parallel`: whether the server should use parallel or single-threaded execution (default: `true`)
- `prefetchSize`: a guideline number of answers that the server should send before the client issues a fresh request (default: `50`)
- `traceInference`: if enabled, outputs reasoning tracing graphs in the logging directory. Should be used with `parallel = false`. (default: `false`)
- `prefetch`: if enabled, the first batch of answers is streamed to the client even without an explicit request for it (default: `true` if query type is `match`, otherwise `false`)
- `sessionIdleTimeoutMillis`: this timeout allows the server to close sessions if a client terminates or becomes unresponsive (default: `30_000`)
- `transactionTimeoutMillis`: this timeout will automatically kill transactions, preventing memory leaks in unclosed transactions (default: `300_000`)
- `schemaLockAcquireTimeoutMillis`: how long the client should wait if opening a session or transaction is blocked by a schema write lock (default: `10_000`)
`TypeDBClusterOptions` has an additional option:
- `readAnyReplica`: enables reading data from any replica, potentially boosting read throughput (default: `false`)
python: |
The transaction query options object `TypeDBOptions` can be used to override the default server behaviour
query processing. Use `TypeDBOptions.core()` to create a new TypeDB Core options object, or `TypeDBOptions.cluster()`
for TypeDB Cluster.
The options are:
- `infer`: whether to enable inference for the provided query (only settable at transaction level and above, and only affects **read** transactions) (default: `False`)
- `explain`: whether to enable explanations for the provided query (only affects **read** transactions) (default: `False`)
- `parallel`: whether the server should use parallel or single-threaded execution (default: `True`)
- `prefetch_size`: a guideline number of answers that the server should send before the client issues a fresh request (default: `50`)
- `trace_inference`: if enabled, outputs reasoning tracing graphs in the logging directory. Should be used with `parallel = False`. (default: `False`)
- `prefetch`: if enabled, the first batch of answers is streamed to the client even without an explicit request for it (default: `True` if query type is `match`, otherwise `False`)
- `session_idle_timeout_millis`: this timeout allows the server to close sessions if a client terminates or becomes unresponsive (default: `30_000`)
- `transaction_timeout_millis`: this timeout will automatically kill transactions, preventing memory leaks in unclosed transactions (default: `300_000`)
- `schema_lock_acquire_timeout_millis`: how long the client should wait if opening a session or transaction is blocked by a schema write lock (default: `10_000`)
`TypeDBClusterOptions` has an additional option:
- `read_any_replica`: enables reading data from any replica, potentially boosting read throughput (default: `False`)
javascript: |
The transaction query options object `TypeDBOptions` can be used to override the default server behaviour
query processing. Use `TypeDBOptions.core()` to create a new TypeDB Core options object, or `TypeDBOptions.cluster()`
for TypeDB Cluster.
The options are:
- `infer`: whether to enable inference for the provided query (only settable at transaction level and above, and only affects **read** transactions) (default: `false`)
- `explain`: whether to enable explanations for the provided query (only affects **read** transactions) (default: `false`)
- `parallel`: whether the server should use parallel or single-threaded execution (default: `true`)
- `prefetchSize`: a guideline number of answers that the server should send before the client issues a fresh request (default: `50`)
- `traceInference`: if enabled, outputs reasoning tracing graphs in the logging directory. Should be used with `parallel = false`. (default: `false`)
- `prefetch`: if enabled, the first batch of answers is streamed to the client even without an explicit request for it (default: `true` if query type is `match`, otherwise `false`)
- `sessionIdleTimeoutMillis`: this timeout allows the server to close sessions if a client terminates or becomes unresponsive (default: `30_000`)
- `transactionTimeoutMillis`: this timeout will automatically kill transactions, preventing memory leaks in unclosed transactions (default: `300_000`)
- `schemaLockAcquireTimeoutMillis`: how long the client should wait if opening a session or transaction is blocked by a schema write lock (default: `10_000`)
`TypeDBClusterOptions` has an additional option:
- `readAnyReplica`: enables reading data from any replica, potentially boosting read throughput (default: `false`)
methods:
- method:
java:
method: options.setInfer(boolean enabled)
title: Explicitly enable or disable inference
description: Override the server defaults to enable or disable inference for the provided query (only settable at transaction level and above, and only affects **read** transactions)
accepts:
param1:
name: enabled
type: boolean
description: explicitly set inference on or off for this query
required: true
returns:
- "[TypeDBOptions](#options)"
- method:
java:
method: options.setExplain(boolean enabled)
title: Explicitly enable or disable explanations
description: Override the server defaults to enable or disable explanation availability for the provided query (only affects **read** transactions)
accepts:
param1:
name: enabled
type: boolean
description: explicitly set explanations on or off for this query
required: true
returns:
- "[TypeDBOptions](#options)"
- method:
java:
method: options.setParallel(boolean parallel)
title: Force the server parallelism
description: Override the server defaults to use parallel or single-threaded query execution
accepts:
param1:
name: parallel
type: boolean
description: use parallel or single-threaded query execution
required: true
returns:
- "[TypeDBOptions](#options)"
- method:
java:
method: options.setPrefetchSize(int size)
title: Explicitly set query prefetch to a certain size
description: >
Override the server defaults for answer batch streaming. This tells the server to pre-compute and stream this
number of answers at a time. These are buffered in the client until read. A larger batch size causes the server
to compute more answers at a time, blocking the transaction until the batch is computed.
accepts:
param1:
name: size
type: int
required: true
returns:
- "[TypeDBOptions](#options)"
- method:
java:
method: options.setTraceInference(boolean traceInference)
title: Trace and log reasoning inference
description: Create reasoning traces as graphs logged in the logging directory. Should be used with `parallel = false`
accepts:
param1:
name: traceInference
type: boolean
description: trace reasoning execution as graphs in log directory
required: true
returns:
- "[TypeDBOptions](#options)"
- method:
java:
method: options.setPrefetch(boolean prefetch)
title: Explicitly enable or disable prefetch
description: If enabled, the first batch of answers is streamed to the client even without an explicit request for it
accepts:
param1:
name: prefetch
type: boolean
description: if set to true, the first batch of answers is streamed to the client even without an explicit request for it
required: true
returns:
- "[TypeDBOptions](#options)"
- method:
java:
method: options.setSessionIdleTimeoutMillis(int timeout)
title: Override default session idle timeout
description: This timeout allows the server to close sessions if a client terminates or becomes unresponsive
accepts:
param1:
name: timeout
type: int
required: true
returns:
- "[TypeDBOptions](#options)"
- method:
java:
method: options.setTransactionTimeoutMillis(int timeout)
title: Override default transaction timeout
description: This timeout automatically closes transactions that exceed the configured time. This prevents memory leaks caused by transactions accidentally left unclosed, and kills unresponsive transactions.
accepts:
param1:
name: timeout
type: int
required: true
returns:
- "[TypeDBOptions](#options)"
- method:
java:
method: options.setSchemaLockAcquireTimeoutMillis(int timeout)
title: Override default schema lock acquire timeout
description: This timeout allows the server to close sessions if a client terminates or becomes unresponsive
accepts:
param1:
name: timeout
type: int
required: true
returns:
- "[TypeDBOptions](#options)"
- method:
java:
method: clusterOptions.setReadAnyReplica(bool readAnyReplica)
title: Enable reading data from any replica
description: Used to enable reading data from any replica, potentially boosting read throughput
accepts:
param1:
name: readAnyReplica
type: boolean
required: true
returns:
- "[TypeDBClusterOptions](#options)"