Search in sources :

Example 1 with RunScriptCommand

use of org.h2.command.dml.RunScriptCommand in project h2database by h2database.

the class Parser method parseRunScript.

private RunScriptCommand parseRunScript() {
    RunScriptCommand command = new RunScriptCommand(session);
    read("FROM");
    command.setFileNameExpr(readExpression());
    if (readIf("COMPRESSION")) {
        command.setCompressionAlgorithm(readUniqueIdentifier());
    }
    if (readIf("CIPHER")) {
        command.setCipher(readUniqueIdentifier());
        if (readIf("PASSWORD")) {
            command.setPassword(readExpression());
        }
    }
    if (readIf("CHARSET")) {
        command.setCharset(Charset.forName(readString()));
    }
    return command;
}
Also used : RunScriptCommand(org.h2.command.dml.RunScriptCommand)

Aggregations

RunScriptCommand (org.h2.command.dml.RunScriptCommand)1