You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 6, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: docs/reference/operations-guide/core.md
+149Lines changed: 149 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4524,11 +4524,118 @@ Gets the Schema of a Graph. [Javadoc](https://gchq.github.io/Gaffer/uk/gov/gchq/
4524
4524
}
4525
4525
```
4526
4526
4527
+
## Variables
4528
+
4529
+
Operations associated with storing variables in the operation context map. Note that the context only exists during that operation and so these operations must be contained within the same operation chain to work.
4530
+
4531
+
### SetVariable
4532
+
4533
+
Stores a variable in the Context variable map. Takes a variable
4534
+
name and an input and stores them as a key value pair. [Javadoc](https://gchq.github.io/Gaffer/uk/gov/gchq/gaffer/operation/impl/SetVariable.html)
4535
+
4536
+
??? example "Example setting a variable"
4537
+
=== "Java"
4538
+
4539
+
``` java
4540
+
final SetVariable op = new SetVariable.Builder()
4541
+
.variableName("varName")
4542
+
.input(5)
4543
+
.build();
4544
+
```
4545
+
4546
+
=== "JSON"
4547
+
4548
+
``` json
4549
+
{
4550
+
"class" : "SetVariable",
4551
+
"variableName": "varName",
4552
+
"input": 5
4553
+
}
4554
+
```
4555
+
4556
+
### GetVariable
4557
+
4558
+
Gets a variable from the Context variable map. Takes the variable
4559
+
name as an input. [Javadoc](https://gchq.github.io/Gaffer/uk/gov/gchq/gaffer/operation/impl/GetVariable.html)
4560
+
4561
+
??? example "Example getting a variable"
4562
+
=== "Java"
4563
+
4564
+
``` java
4565
+
final GetVariable op = new GetVariable.Builder()
4566
+
.variableName("varName")
4567
+
.build();
4568
+
```
4569
+
4570
+
=== "JSON"
4571
+
4572
+
``` json
4573
+
{
4574
+
"class" : "GetVariable",
4575
+
"variableName": "varName"
4576
+
}
4577
+
```
4578
+
4579
+
Results:
4580
+
4581
+
=== "Java"
4582
+
4583
+
``` java
4584
+
5
4585
+
```
4586
+
4587
+
=== "JSON"
4588
+
4589
+
``` json
4590
+
5
4591
+
```
4592
+
4593
+
### GetVariables
4594
+
4595
+
Gets all the variables from the Context variable map. Takes a list of variable names
4596
+
as an input. [Javadoc](https://gchq.github.io/Gaffer/uk/gov/gchq/gaffer/operation/impl/GetVariables.html)
4597
+
4598
+
??? example "Example getting all variables"
4599
+
=== "Java"
4600
+
4601
+
``` java
4602
+
final List<String> variableNames = Arrays.asList("varName");
4603
+
final GetVariables op = new GetVariables.Builder()
4604
+
.variableNames(variableNames)
4605
+
.build();
4606
+
```
4607
+
4608
+
=== "JSON"
4609
+
4610
+
``` json
4611
+
{
4612
+
"class" : "GetVariables",
4613
+
"variableNames": ["varName"]
4614
+
}
4615
+
```
4616
+
4617
+
Results:
4618
+
4619
+
=== "Java"
4620
+
4621
+
``` java
4622
+
5
4623
+
```
4624
+
4625
+
=== "JSON"
4626
+
4627
+
``` json
4628
+
5
4629
+
```
4630
+
4527
4631
## GetTraits
4528
4632
4529
4633
Gets the traits of the current store. [Javadoc](https://gchq.github.io/Gaffer/uk/gov/gchq/gaffer/store/operation/GetTraits.html)
4530
4634
4531
4635
??? example "Example getting all traits"
4636
+
`currentTraits` is an optional field that holds a boolean value. When false the
4637
+
operation returns a list of all supported traits from the store, but if true then a list of current traits is returned.
4638
+
Defaults to true.
4532
4639
4533
4640
=== "Java"
4534
4641
@@ -4625,6 +4732,48 @@ Gets the traits of the current store. [Javadoc](https://gchq.github.io/Gaffer/uk
0 commit comments