Package org.jooq

Examples of org.jooq.SQLDialect


        }
    }

    @Override
    public final void toSQL(RenderContext context) {
        SQLDialect dialect = context.getDialect();
        Field<?> lhs = field1;

        // [#1159] Some dialects cannot auto-convert the LHS operand to a
        // VARCHAR when applying a LIKE predicate
        // [#293] TODO: This could apply to other operators, too
View Full Code Here


    }

    @SuppressWarnings("unchecked")
    @Override
    final Field<T> getFunction0(Configuration configuration) {
        SQLDialect dialect = configuration.getDialect();

        // DB2, H2 and HSQLDB know functions, instead of operators
        if (BIT_AND == operator && asList(DB2, H2, HSQLDB, ORACLE).contains(dialect)) {
            return function("bitand", getDataType(), getArguments());
        }
View Full Code Here

        /**
         * Return the expression to be rendered when the RHS is an interval type
         */
        private final Field<T> getIntervalExpression(Configuration configuration) {
            SQLDialect dialect = configuration.getDialect();
            int sign = (operator == ADD) ? 1 : -1;

            switch (dialect) {
                case ASE:
                case SYBASE:
View Full Code Here

    /**
     * Inlining abstraction
     */
    @SuppressWarnings({ "unchecked", "rawtypes" })
    private void toSQL(RenderContext context, Object val, Class<?> type) {
        SQLDialect dialect = context.getDialect();

        // [#650] Check first, if we have a converter for the supplied type
        Converter<?, ?> converter = DataTypes.converter(type);
        if (converter != null) {
            val = ((Converter) converter).to(val);
View Full Code Here

        return getAttachables(field);
    }

    @Override
    public final void toSQL(RenderContext context) {
        SQLDialect dialect = context.getDialect();

        if (operator == BIT_NOT && asList(H2, HSQLDB, INGRES, ORACLE).contains(dialect)) {
            context.sql("(0 -")
                   .sql(field)
                   .sql(" - 1)");
View Full Code Here

        return type;
    }

    @Override
    public final java.sql.Array createArray() throws SQLException {
        SQLDialect dialect = getConfiguration().getDialect();

        switch (dialect) {
            case ORACLE: {
                // [#1161] Use reflection to avoid compile-time on ojdbc
                return on(getDriverConnection(getConfiguration())).call("createARRAY", getName(), get()).get();
View Full Code Here

        this.escape = escape;
    }

    @Override
    public final void accept(Context<?> ctx) {
        SQLDialect family = ctx.configuration().dialect().family();
        Field<?> lhs = field1;
        Field<?> rhs = field2;
        Comparator op = comparator;

        // [#1159] Some dialects cannot auto-convert the LHS operand to a
View Full Code Here

        // be null for CustomTable et al.
        if (literal == null) {
            return this;
        }

        SQLDialect family = family();

        // Quoting is needed when explicitly requested...
        boolean needsQuote =

            // [#2367] ... but in SQLite, quoting "normal" literals is generally
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    @Override
    final Field<T> getFunction0(Configuration configuration) {
        SQLDialect family = configuration.dialect().family();

        // ---------------------------------------------------------------------
        // XXX: Bitwise operators
        // ---------------------------------------------------------------------
View Full Code Here

        /**
         * Return the expression to be rendered when the RHS is an interval type
         */
        @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

TOP

Related Classes of org.jooq.SQLDialect

Copyright © 2018 www.massapicom. 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.