Database Connections

Overview

When analyzing queries via the queryAnalysis() command, by default our engines analyze the query regardless of the database it'll run against. You can however provide a connection to the database that you would like to test your query against.
We highly recommend adding a connection when analyzing queries, as we provide stronger insights against the scenario the queries will actually be tested in.

Create a New Connection

Open the CLI tool and type the following command-
CLI
REPL
metis-cli add-connection
addConnection()
A wizard will take over and ask for the necessary inputs.
Adding a db connection using addConnection()

View existing Connections

CLI
REPL
metis-cli list-connections
listConnections()
View existing connections

Connect

CLI
REPL
No need to connect in CLI mode. Your default connection will be used.
You can set the default connection by running-
metis-cli set-default-connection 'connection-name'
connect('connection-name')
You can now perform query analysis against the connected database
🎉