Package org.jooq

Examples of org.jooq.SQLDialect.family()


    private Class<? extends Database> databaseClass(Jdbc j) {
        SQLDialect dialect = JDBCUtils.dialect(j.getUrl());
        Class<? extends Database> result = JDBCDatabase.class;

        switch (dialect.family()) {
            /* [pro] xx
            xxxx xxxxxxx    xxxxxx x xxxxxxxxxxxxxxxxxxx      xxxxxx
            xxxx xxxx       xxxxxx x xxxxxxxxxxxxxxxxxx       xxxxxx
            xxxx xxxx       xxxxxx x xxxxxxxxxxxxxxxxxx       xxxxxx
            xxxx xxxxxxxxx  xxxxxx x xxxxxxxxxxxxxxxxxxxxxxx  xxxxxx
View Full Code Here


            // [#454] [#1801] Some databases don't allow "derived column names" in
            // "simple class specifications", or "common table expression references".
            // Hence, wrap the table reference in a subselect
            if (fieldAliases != null
                    && asList(CUBRID, FIREBIRD).contains(dialect.family())
                    && (wrapped instanceof TableImpl || wrapped instanceof CommonTableExpressionImpl)) {

                @SuppressWarnings("unchecked")
                Select<Record> select =
                    select(list(field("*"))).from(((Table<?>) wrapped).as(alias));
View Full Code Here

            }

            // [#1801] Some databases do not support "derived column names".
            // They can be simulated by concatenating a dummy SELECT with no
            // results using UNION ALL
            else if (fieldAliases != null && asList(H2, MARIADB, MYSQL, SQLITE).contains(dialect.family())) {
                simulateDerivedColumnList = true;

                SelectFieldList fields = new SelectFieldList();
                for (String fieldAlias : fieldAliases) {
View Full Code Here

                simulateDerivedColumnList = true;

                SelectFieldList fields = new SelectFieldList();
                for (String fieldAlias : fieldAliases) {

                    switch (dialect.family()) {

                        /* [pro] xx
                        xxxx xxxxxxx x
                            xx xxxxxxxxxxx xx xxxxxx xxxxxxx xxxx xxxxx xxxxxxxxx xxxxx xx x xxxxxxx xxxxxxxxx
                            xx xx xxx xxxxx xxxxxxxxx xxxxxxx xx xxxxx
View Full Code Here

        @SuppressWarnings({ "unchecked", "rawtypes" })
        private final Field<T> getIntervalExpression(Configuration configuration) {
            SQLDialect dialect = configuration.dialect();
            int sign = (operator == ADD) ? 1 : -1;

            switch (dialect.family()) {
                case CUBRID:
                case MARIADB:
                case MYSQL: {
                    Interval interval = rhsAsInterval();
View Full Code Here

    private final QueryPartInternal delegate(Configuration configuration) {
        SQLDialect dialect = configuration.dialect();

        // Regular comparison predicate simulation
        if (asList(EQUALS, NOT_EQUALS).contains(comparator) &&
            asList(DERBY, FIREBIRD, SQLITE).contains(dialect.family())) {
            List<Condition> conditions = new ArrayList<Condition>();

            Field<?>[] leftFields = left.fields();
            Field<?>[] rightFields = right.fields();
View Full Code Here

            return (QueryPartInternal) result;
        }

        // Ordering comparison predicate simulation
        else if (asList(GREATER, GREATER_OR_EQUAL, LESS, LESS_OR_EQUAL).contains(comparator) &&
                 asList(DERBY, CUBRID, FIREBIRD, SQLITE).contains(dialect.family())) {

            // The order component of the comparator (stripping the equal component)
            Comparator order
                = (comparator == GREATER) ? GREATER
                : (comparator == GREATER_OR_EQUAL) ? GREATER
View Full Code Here

                else {
                    ctx.statement().setBigDecimal(ctx.index(), (BigDecimal) value);
                }
            }
            else if (actualType == BigInteger.class) {
                if (asList(SQLITE).contains(dialect.family())) {
                    ctx.statement().setString(ctx.index(), value.toString());
                }
                else {
                    ctx.statement().setBigDecimal(ctx.index(), new BigDecimal((BigInteger) value));
                }
View Full Code Here

                xxxx
                xx [/pro] */
                ctx.statement().setBigDecimal(ctx.index(), new BigDecimal(value.toString()));
            }
            else if (actualType == UUID.class) {
                switch (dialect.family()) {

                    // [#1624] Some JDBC drivers natively support the
                    // java.util.UUID data type
                    case H2:
                    case POSTGRES: {
View Full Code Here

                xxxx
                xx [/pro] */
                    ctx.statement().setBoolean(ctx.index(), (Boolean) value);
            }
            else if (actualType == BigDecimal.class) {
                if (asList(SQLITE).contains(dialect.family())) {
                    ctx.statement().setString(ctx.index(), value.toString());
                }
                else {
                    ctx.statement().setBigDecimal(ctx.index(), (BigDecimal) value);
                }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.