Package org.jooq

Examples of org.jooq.ExecuteContext.statement()


            if (autoCommit && configuration.getDialect() == SQLDialect.POSTGRES) {
                connection.setAutoCommit(false);
            }

            listener.executeStart(ctx);
            ctx.statement().execute();
            listener.executeEnd(ctx);

            if (autoCommit && configuration.getDialect() == SQLDialect.POSTGRES) {
                connection.setAutoCommit(autoCommit);
            }
View Full Code Here


                listener.prepareEnd(ctx);

                // [#1145] Bind variables only for true prepared statements
                if (executePreparedStatements(getConfiguration().getSettings())) {
                    listener.bindStart(ctx);
                    create(configuration).bind(this, ctx.statement());
                    listener.bindEnd(ctx);
                }

                result = execute(ctx, listener);
                return result;
View Full Code Here

            listener.renderStart(ctx);
            ctx.sql(create.render(query));
            listener.renderEnd(ctx);

            listener.prepareStart(ctx);
            ctx.statement(connection.prepareStatement(ctx.sql()));
            listener.prepareEnd(ctx);

            for (Object[] bindValues : allBindValues) {
                listener.bindStart(ctx);
                new DefaultBindContext(create, ctx.statement()).bindValues(bindValues);
View Full Code Here

            ctx.statement(connection.prepareStatement(ctx.sql()));
            listener.prepareEnd(ctx);

            for (Object[] bindValues : allBindValues) {
                listener.bindStart(ctx);
                new DefaultBindContext(create, ctx.statement()).bindValues(bindValues);
                listener.bindEnd(ctx);

                ctx.statement().addBatch();
            }
View Full Code Here

            for (Object[] bindValues : allBindValues) {
                listener.bindStart(ctx);
                new DefaultBindContext(create, ctx.statement()).bindValues(bindValues);
                listener.bindEnd(ctx);

                ctx.statement().addBatch();
            }

            listener.executeStart(ctx);
            int[] result = ctx.statement().executeBatch();
            listener.executeEnd(ctx);
View Full Code Here

                ctx.statement().addBatch();
            }

            listener.executeStart(ctx);
            int[] result = ctx.statement().executeBatch();
            listener.executeEnd(ctx);

            return result;
        }
        catch (SQLException e) {
View Full Code Here

        ExecuteContext ctx = new DefaultExecuteContext(create, queries);
        ExecuteListener listener = new ExecuteListeners(ctx);

        try {
            ctx.statement(new PreparedStatementProxy(connection));

            String[] batchSQL = ctx.batchSQL();
            for (int i = 0; i < queries.length; i++) {
                listener.renderStart(ctx);
                batchSQL[i] = create.renderInlined(queries[i]);
View Full Code Here

            }

            for (String sql : batchSQL) {
                ctx.sql(sql);
                listener.prepareStart(ctx);
                ctx.statement().addBatch(sql);
                listener.prepareEnd(ctx);
                ctx.sql(null);
            }

            listener.executeStart(ctx);
View Full Code Here

                listener.prepareEnd(ctx);
                ctx.sql(null);
            }

            listener.executeStart(ctx);
            int[] result = ctx.statement().executeBatch();
            listener.executeEnd(ctx);

            return result;
        }
        catch (SQLException e) {
View Full Code Here

            // [#1520] TODO: Should the number of bind values be checked, here?
            ctx.sql(create(configuration).render(this));
            listener.renderEnd(ctx);

            listener.prepareStart(ctx);
            ctx.statement(connection.prepareCall(ctx.sql()));
            // [#1856] TODO: Add Statement flags like timeout here
            listener.prepareEnd(ctx);

            listener.bindStart(ctx);
            using(configuration).bindContext(ctx.statement()).visit(this);
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.