use of org.neo4j.shell.prettyprint.PrettyConfig in project neo4j by neo4j.
the class CypherShellTransactionIntegrationTest method setUp.
@Before
public void setUp() throws Exception {
linePrinter.clear();
shell = new CypherShell(linePrinter, new PrettyConfig(Format.VERBOSE, true, 1000), false, new ShellParameterMap());
rollbackCommand = new Rollback(shell);
commitCommand = new Commit(shell);
beginCommand = new Begin(shell);
connect("neo");
shell.execute("MATCH (n) DETACH DELETE (n)");
}
use of org.neo4j.shell.prettyprint.PrettyConfig in project neo4j by neo4j.
the class Main method startShell.
void startShell(@Nonnull CliArgs cliArgs) {
if (cliArgs.getVersion()) {
out.println("Cypher-Shell " + Build.version());
}
if (cliArgs.getDriverVersion()) {
out.println("Neo4j Driver " + Build.driverVersion());
}
if (cliArgs.getVersion() || cliArgs.getDriverVersion()) {
return;
}
Logger logger = new AnsiLogger(cliArgs.getDebugMode());
PrettyConfig prettyConfig = new PrettyConfig(cliArgs);
CypherShell shell = new CypherShell(logger, prettyConfig, ShellRunner.shouldBeInteractive(cliArgs), cliArgs.getParameters());
int exitCode = runShell(cliArgs, shell, logger);
System.exit(exitCode);
}
use of org.neo4j.shell.prettyprint.PrettyConfig in project neo4j by neo4j.
the class CypherShellFailureIntegrationTest method setUp.
@Before
public void setUp() {
linePrinter.clear();
shell = new CypherShell(linePrinter, new PrettyConfig(Format.VERBOSE, true, 1000), false, new ShellParameterMap());
}
use of org.neo4j.shell.prettyprint.PrettyConfig in project neo4j by neo4j.
the class CypherShellMultiDatabaseIntegrationTest method setUp.
@Before
public void setUp() throws Exception {
linePrinter.clear();
shell = new CypherShell(linePrinter, new PrettyConfig(Format.PLAIN, true, 1000), false, new ShellParameterMap());
useCommand = new Use(shell);
beginCommand = new Begin(shell);
rollbackCommand = new Rollback(shell);
shell.connect(new ConnectionConfig("bolt", "localhost", 7687, "neo4j", "neo", Encryption.DEFAULT, ABSENT_DB_NAME));
// Multiple databases are only available from 4.0
assumeTrue(majorVersion(shell.getServerVersion()) >= 4);
}
use of org.neo4j.shell.prettyprint.PrettyConfig in project neo4j by neo4j.
the class CypherShellProtocolIntegrationTest method shouldConnectWithBoltProtocol.
@Test
public void shouldConnectWithBoltProtocol() throws Exception {
CypherShell shell = new CypherShell(new StringLinePrinter(), new PrettyConfig(Format.PLAIN, true, 1000), false, new ShellParameterMap());
shell.connect(new ConnectionConfig("bolt", "localhost", 7687, "neo4j", "neo", Encryption.DEFAULT, ABSENT_DB_NAME));
assertTrue(shell.isConnected());
}
Aggregations