forked from typedb/typedb-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
options.yml
95 lines (86 loc) · 3.67 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
title: Options
description:
java: |
The transaction query options object `Transaction.Options` can be used to override the default server behaviour
query processing.
The server defaults are:
- `infer = true`
- `explain = false`
- `batchSize = 50`
python: |
The transaction query optional parameters can be used to override the default server behaviour for query processing.
The server defaults are:
- `infer = True`
- `explain = False`
- `batch_size = 50`
`batch_size` 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. Use `Transaction.Options.BATCH_ALL` to retrieve all answers from the server
with a single client-side request.
javascript: |
The transaction query options Object can be used to override the default server behaviour for query processing.
We can provide any of the allowed keys: `infer`, `explain`, and `batchSize`.
The server defaults are:
- `infer = true`
- `explain = false`
- `batchSize = 50`
`batchSize` 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. Use `batchSize : "all"` to retrieve all answers from the server with a single
client-side request.
methods:
- method:
java:
method: Transaction.Options.infer(boolean enabled)
title: Explicitly enable or disable inference
description: Override the server defaults to enable or disable inference for the provided query
accepts:
param1:
name: enabled
type: boolean
description: explicitly set inference on or off for this query
required: true
returns:
- "[Transaction.Options](#options)"
- method:
java:
method: Transaction.Options.explain(boolean enabled)
title: Explicitly enable or disable explanations
description: Override the server defaults to enable or disable explanation availability for the provided query.
accepts:
param1:
name: enabled
type: boolean
description: explicitly set explanations on or off for this query
required: true
returns:
- "[Transaction.Options](#options)"
- method:
java:
method: Transaction.Options.batchSize(int size)
title: Explicitly set query batch iteration 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: enabled
type: int
required: true
returns:
- "[Transaction.Options](#options)"
- method:
java:
method: Transaction.Options.batchSize(BatchSize batchSize)
title: Explicitly set query batch iteration size with available Enum values
description: >
Use a pre-set non-integer Enum provided by the Options object, such as ALL, which streams all
answers from the server without any further round trips from the client.
accepts:
param1:
name: batchSize
type: BatchSize
required: true
returns:
- "Transaction.Options (#options)"