Search in sources :

Example 1 with ODropClassStatement

use of com.orientechnologies.orient.core.sql.parser.ODropClassStatement in project orientdb by orientechnologies.

the class OCommandExecutorSQLDropClass method parse.

public OCommandExecutorSQLDropClass parse(final OCommandRequest iRequest) {
    final OCommandRequestText textRequest = (OCommandRequestText) iRequest;
    String queryText = textRequest.getText();
    String originalQuery = queryText;
    try {
        queryText = preParse(queryText, iRequest);
        textRequest.setText(queryText);
        final boolean strict = getDatabase().getStorage().getConfiguration().isStrictSql();
        if (strict) {
            this.className = ((ODropClassStatement) this.preParsedStatement).name.getStringValue();
            this.unsafe = ((ODropClassStatement) this.preParsedStatement).unsafe;
            this.ifExists = ((ODropClassStatement) this.preParsedStatement).ifExists;
        } else {
            oldParsing((OCommandRequestText) iRequest);
        }
    } finally {
        textRequest.setText(originalQuery);
    }
    return this;
}
Also used : OCommandRequestText(com.orientechnologies.orient.core.command.OCommandRequestText) ODropClassStatement(com.orientechnologies.orient.core.sql.parser.ODropClassStatement)

Aggregations

OCommandRequestText (com.orientechnologies.orient.core.command.OCommandRequestText)1 ODropClassStatement (com.orientechnologies.orient.core.sql.parser.ODropClassStatement)1