All Downloads are FREE. Search and download functionalities are using the official Maven repository.

sqlancer.postgres.ast.PostgresAlias Maven / Gradle / Ivy

Go to download

SQLancer finds logic bugs in Database Management Systems through automatic testing

There is a newer version: 2.0.0
Show newest version
package sqlancer.postgres.ast;

import sqlancer.common.visitor.UnaryOperation;

public class PostgresAlias implements UnaryOperation, PostgresExpression {

    private final PostgresExpression expr;
    private final String alias;

    public PostgresAlias(PostgresExpression expr, String alias) {
        this.expr = expr;
        this.alias = alias;
    }

    @Override
    public PostgresExpression getExpression() {
        return expr;
    }

    @Override
    public String getOperatorRepresentation() {
        return " as " + alias;
    }

    @Override
    public OperatorKind getOperatorKind() {
        return OperatorKind.POSTFIX;
    }

    @Override
    public boolean omitBracketsWhenPrinting() {
        return true;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy