Search in sources :

Example 1 with JaqyDriverManager

use of com.teradata.jaqy.JaqyDriverManager in project jaqy by Teradata.

the class ProtocolCommand method execute.

@Override
public void execute(String[] args, boolean silent, JaqyInterpreter interpreter) throws Exception {
    JaqyDriverManager driverManager = interpreter.getGlobals().getDriverManager();
    if (args.length == 0) {
        PropertyTable pt = PropertyTableUtils.createPropertyTable(driverManager.getDriverProtocolMap(), new String[] { "Protocol", "Driver" });
        interpreter.print(pt);
        return;
    }
    if (args.length != 2) {
        interpreter.error("invalid command arguments.");
    }
    driverManager.addDriverProtocol(args[0], args[1]);
}
Also used : PropertyTable(com.teradata.jaqy.PropertyTable) JaqyDriverManager(com.teradata.jaqy.JaqyDriverManager)

Aggregations

JaqyDriverManager (com.teradata.jaqy.JaqyDriverManager)1 PropertyTable (com.teradata.jaqy.PropertyTable)1