Examples of SQLDialect


Examples of org.jooq.SQLDialect

     */
    private static final long serialVersionUID = -2450323227461061152L;

    @Override
    public void exception(ExecuteContext ctx) {
        SQLDialect dialect = ctx.configuration().dialect();
        SQLExceptionTranslator translator = (dialect != null)
                ? new SQLErrorCodeSQLExceptionTranslator(dialect.name())
                : new SQLStateSQLExceptionTranslator();

        ctx.exception(translator.translate("jOOQ", ctx.sql(), ctx.sqlException()));
    }
View Full Code Here

Examples of org.jooq.SQLDialect

    }

    @Override
    @SuppressWarnings({ "unchecked", "rawtypes" })
    protected final BindContext bindValue0(Object value, Class<?> type) throws SQLException {
        SQLDialect dialect = configuration.getDialect();

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

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

Examples of org.jooq.SQLDialect

    }

    @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

Examples of org.jooq.SQLDialect

        /**
         * 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

Examples of org.jooq.SQLDialect

    /**
     * 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

Examples of org.jooq.SQLDialect

        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

Examples of org.jooq.SQLDialect

        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

Examples of org.jooq.SQLDialect

        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

Examples of org.jooq.SQLDialect

        // 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
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.