public class SampleKBLoader extends Object
Builds GraknTx bypassing engine.
A helper class which is used to build GraknTx for testing purposes.
This class bypasses requiring an instance of engine to be running in the background.
Rather it acquires the necessary properties for building a graph directly from system properties.
This does however mean that commit logs are not submitted and no post processing is ran
| Modifier and Type | Method and Description |
|---|---|
static SampleKBLoader |
empty() |
static void |
loadFromFile(ai.grakn.GraknTx graph,
String file) |
static SampleKBLoader |
preLoad(java.util.function.Consumer<ai.grakn.GraknTx> build) |
static ai.grakn.Keyspace |
randomKeyspace() |
void |
rollback() |
EmbeddedGraknTx<?> |
tx() |
public static SampleKBLoader empty()
public static SampleKBLoader preLoad(@Nullable java.util.function.Consumer<ai.grakn.GraknTx> build)
public EmbeddedGraknTx<?> tx()
public void rollback()
public static ai.grakn.Keyspace randomKeyspace()
public static void loadFromFile(ai.grakn.GraknTx graph,
String file)
Copyright © 2018 Grakn Labs Ltd. All rights reserved.