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

org.zodiac.fastorm.rdb.metadata.RDBFeatures Maven / Gradle / Ivy

The newest version!
package org.zodiac.fastorm.rdb.metadata;

import org.zodiac.fastorm.core.FeatureId;
import org.zodiac.fastorm.core.param.TermType;
import org.zodiac.fastorm.rdb.operator.builder.fragments.function.SimpleFunctionFragmentBuilder;
import org.zodiac.fastorm.rdb.operator.builder.fragments.query.QuerySqlFragmentBuilder;
import org.zodiac.fastorm.rdb.operator.builder.fragments.term.BetweenAndTermFragmentBuilder;
import org.zodiac.fastorm.rdb.operator.builder.fragments.term.EmptyTermFragmentBuilder;
import org.zodiac.fastorm.rdb.operator.builder.fragments.term.InTermFragmentBuilder;
import org.zodiac.fastorm.rdb.operator.builder.fragments.term.LikeTermFragmentBuilder;
import org.zodiac.fastorm.rdb.operator.builder.fragments.term.NullTermFragmentBuilder;
import org.zodiac.fastorm.rdb.operator.builder.fragments.term.SymbolTermFragmentBuilder;

public interface RDBFeatures {

    FeatureId where = FeatureId.of(QuerySqlFragmentBuilder.where);

    FeatureId select = FeatureId.of(QuerySqlFragmentBuilder.selectColumns);
    FeatureId selectJoin = FeatureId.of(QuerySqlFragmentBuilder.join);
    FeatureId orderBy = FeatureId.of(QuerySqlFragmentBuilder.sortOrder);

    /*General query conditions.*/
    SymbolTermFragmentBuilder eq = new SymbolTermFragmentBuilder("eq", "EqualTo", "=");
    SymbolTermFragmentBuilder is = new SymbolTermFragmentBuilder("is", "EqualTo", "=");

    SymbolTermFragmentBuilder not = new SymbolTermFragmentBuilder("not", "NotEqualTo", "!=");
    SymbolTermFragmentBuilder notEq = new SymbolTermFragmentBuilder("neq", "NotEqualTo", "!=");

    LikeTermFragmentBuilder like = new LikeTermFragmentBuilder(false);
    LikeTermFragmentBuilder nlike = new LikeTermFragmentBuilder(true);

    SymbolTermFragmentBuilder gt = new SymbolTermFragmentBuilder("gt", "GreaterThan", ">");
    SymbolTermFragmentBuilder lt = new SymbolTermFragmentBuilder("lt", "LessThan", "<");
    SymbolTermFragmentBuilder gte = new SymbolTermFragmentBuilder("gte", "GreaterThanOrRqualTo", ">=");
    SymbolTermFragmentBuilder lte = new SymbolTermFragmentBuilder("lte", "LessThanOrEqualTo", "<=");

    BetweenAndTermFragmentBuilder between = new BetweenAndTermFragmentBuilder("btw", "Between", false);
    BetweenAndTermFragmentBuilder notBetween = new BetweenAndTermFragmentBuilder("nbtw", "NotBetween", true);

    InTermFragmentBuilder in = new InTermFragmentBuilder("in", "IN", false);
    InTermFragmentBuilder notIn = new InTermFragmentBuilder("nin", "NotIn", true);

    EmptyTermFragmentBuilder isEmpty = new EmptyTermFragmentBuilder("empty", "Empty", false);
    EmptyTermFragmentBuilder notEmpty = new EmptyTermFragmentBuilder("notempty", "NotEmpty", true);
    EmptyTermFragmentBuilder nEmpty = new EmptyTermFragmentBuilder(TermType.nempty, "NotEqualToEmpty", true);

    NullTermFragmentBuilder isNull = new NullTermFragmentBuilder("isnull", "IsNull", false);
    NullTermFragmentBuilder notNull = new NullTermFragmentBuilder("notnull", "NotNull", true);

    /*===============Functions.==============*/

    /*==Aggregate functions.==*/
    SimpleFunctionFragmentBuilder count = new SimpleFunctionFragmentBuilder("count", "COUNT");
    SimpleFunctionFragmentBuilder sum = new SimpleFunctionFragmentBuilder("sum", "SUM");
    SimpleFunctionFragmentBuilder avg = new SimpleFunctionFragmentBuilder("avg", "AverageValue");
    SimpleFunctionFragmentBuilder max = new SimpleFunctionFragmentBuilder("max", "MaximumValue");
    SimpleFunctionFragmentBuilder min = new SimpleFunctionFragmentBuilder("min", "MinimumValue");

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy