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

sqlancer.tidb.ast.TiDBRegexOperation 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.tidb.ast;

import sqlancer.Randomly;
import sqlancer.common.ast.BinaryOperatorNode;
import sqlancer.common.ast.BinaryOperatorNode.Operator;
import sqlancer.tidb.ast.TiDBRegexOperation.TiDBRegexOperator;

public class TiDBRegexOperation extends BinaryOperatorNode
        implements TiDBExpression {

    public enum TiDBRegexOperator implements Operator {
        LIKE("LIKE"), //
        NOT_LIKE("NOT LIKE"), //
        ILIKE("REGEXP"), //
        NOT_REGEXP("NOT REGEXP");

        private String textRepr;

        TiDBRegexOperator(String textRepr) {
            this.textRepr = textRepr;
        }

        public static TiDBRegexOperator getRandom() {
            return Randomly.fromOptions(values());
        }

        @Override
        public String getTextRepresentation() {
            return textRepr;
        }

    }

    public TiDBRegexOperation(TiDBExpression left, TiDBExpression right, TiDBRegexOperator op) {
        super(left, right, op);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy